-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixpkgs update and few fixes #394
Open
nazarewk
wants to merge
5
commits into
divnix:main
Choose a base branch
from
nazarewk:fix-old-lockfile
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+367
−255
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
eee0a7e
ci: remove lastModified thing
blaggacao 3a11366
fix: src/data: fix #393 by extracting mdbook to own cell
nazarewk 0245a80
fix: prettier-plugin-toml for new format
nazarewk 03ad54b
fix: lefthook: add --no-auto-install
nazarewk d13782e
chore: switch nixpkgs to nixos-unstable, treefmt
nazarewk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"image": "std-vscode", | ||
"settings": { | ||
"terminal.integrated.shell.linux": "/bin/bash" | ||
} | ||
} | ||
"image": "std-vscode", | ||
"settings": { | ||
"terminal.integrated.shell.linux": "/bin/bash" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,58 @@ | ||
// Un-active everything when you click it | ||
Array.prototype.forEach.call(document.getElementsByClassName("pagetoc")[0].children, function(el) { | ||
el.addEventHandler("click", function() { | ||
Array.prototype.forEach.call(document.getElementsByClassName("pagetoc")[0].children, function(el) { | ||
el.classList.remove("active"); | ||
}); | ||
el.classList.add("active"); | ||
Array.prototype.forEach.call( | ||
document.getElementsByClassName("pagetoc")[0].children, | ||
function (el) { | ||
el.addEventHandler("click", function () { | ||
Array.prototype.forEach.call( | ||
document.getElementsByClassName("pagetoc")[0].children, | ||
function (el) { | ||
el.classList.remove("active"); | ||
}, | ||
); | ||
el.classList.add("active"); | ||
}); | ||
}); | ||
}, | ||
); | ||
|
||
var updateFunction = function() { | ||
var updateFunction = function () { | ||
var id; | ||
var elements = document.getElementsByClassName("header"); | ||
Array.prototype.forEach.call(elements, function (el) { | ||
if (window.pageYOffset >= el.offsetTop) { | ||
id = el; | ||
} | ||
}); | ||
|
||
var id; | ||
var elements = document.getElementsByClassName("header"); | ||
Array.prototype.forEach.call(elements, function(el) { | ||
if (window.pageYOffset >= el.offsetTop) { | ||
id = el; | ||
} | ||
}); | ||
|
||
Array.prototype.forEach.call(document.getElementsByClassName("pagetoc")[0].children, function(el) { | ||
el.classList.remove("active"); | ||
}); | ||
if (!id) return; | ||
Array.prototype.forEach.call(document.getElementsByClassName("pagetoc")[0].children, function(el) { | ||
if (id.href.localeCompare(el.href) == 0) { | ||
el.classList.add("active"); | ||
} | ||
}); | ||
Array.prototype.forEach.call( | ||
document.getElementsByClassName("pagetoc")[0].children, | ||
function (el) { | ||
el.classList.remove("active"); | ||
}, | ||
); | ||
if (!id) return; | ||
Array.prototype.forEach.call( | ||
document.getElementsByClassName("pagetoc")[0].children, | ||
function (el) { | ||
if (id.href.localeCompare(el.href) == 0) { | ||
el.classList.add("active"); | ||
} | ||
}, | ||
); | ||
}; | ||
|
||
// Populate sidebar on load | ||
window.addEventListener('load', function() { | ||
var pagetoc = document.getElementsByClassName("pagetoc")[0]; | ||
var elements = document.getElementsByClassName("header"); | ||
Array.prototype.forEach.call(elements, function (el) { | ||
var link = document.createElement("a"); | ||
link.appendChild(document.createTextNode(el.text)); | ||
link.href = el.href; | ||
link.classList.add("pagetoc-" + el.parentElement.tagName); | ||
pagetoc.appendChild(link); | ||
}); | ||
updateFunction.call(); | ||
window.addEventListener("load", function () { | ||
var pagetoc = document.getElementsByClassName("pagetoc")[0]; | ||
var elements = document.getElementsByClassName("header"); | ||
Array.prototype.forEach.call(elements, function (el) { | ||
var link = document.createElement("a"); | ||
link.appendChild(document.createTextNode(el.text)); | ||
link.href = el.href; | ||
link.classList.add("pagetoc-" + el.parentElement.tagName); | ||
pagetoc.appendChild(link); | ||
}); | ||
updateFunction.call(); | ||
}); | ||
|
||
|
||
|
||
// Handle active elements on scroll | ||
window.addEventListener("scroll", updateFunction); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,5 @@ | ||
let | ||
inherit (inputs) nixpkgs; | ||
inherit (inputs.mdbook-paisano-preprocessor.app.package) mdbook-paisano-preprocessor; | ||
in { | ||
hook.mode = "copy"; # let CI pick it up outside of devshell | ||
packages = [ | ||
nixpkgs.alejandra | ||
nixpkgs.nodePackages.prettier | ||
nixpkgs.nodePackages.prettier-plugin-toml | ||
nixpkgs.shfmt | ||
mdbook-paisano-preprocessor | ||
]; | ||
|
||
data = { | ||
book = { | ||
language = "en"; | ||
multilingual = false; | ||
src = "docs"; | ||
title = "Documentation"; | ||
}; | ||
build = { | ||
build-dir = "docs/book"; | ||
}; | ||
preprocessor.paisano-preprocessor = { | ||
before = ["links"]; | ||
registry = ".#__std.init"; | ||
}; | ||
}; | ||
} | ||
/* | ||
extracted out to separate cell to fix https://github.com/divnix/std/issues/393 | ||
you can read the real source at /src/mdbook/configs/mdbook.nix | ||
*/ | ||
inputs.cells.mdbook.configs.mdbook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
let | ||
inherit (inputs) cells; | ||
inherit (inputs.std) findTargets; | ||
|
||
inherit (inputs.nixpkgs.lib) recursiveUpdate mapAttrs; | ||
|
||
data = findTargets { | ||
inherit inputs cell; | ||
block = ./.; | ||
}; | ||
in | ||
mapAttrs (name: config: recursiveUpdate config (data.${name} or {})) cells.lib.cfg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
let | ||
inherit (inputs) nixpkgs; | ||
inherit (inputs.mdbook-paisano-preprocessor.app.package) mdbook-paisano-preprocessor; | ||
in { | ||
hook.mode = "copy"; # let CI pick it up outside of devshell | ||
packages = [ | ||
mdbook-paisano-preprocessor | ||
]; | ||
|
||
data = { | ||
book = { | ||
language = "en"; | ||
multilingual = false; | ||
src = "docs"; | ||
title = "Documentation"; | ||
}; | ||
build = { | ||
build-dir = "docs/book"; | ||
}; | ||
preprocessor.paisano-preprocessor = { | ||
before = ["links"]; | ||
registry = ".#__std.init"; | ||
}; | ||
}; | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
{ | ||
root, | ||
super, | ||
}: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually we could switch to 24.05 since it contains this flag implemented at https://github.com/evilmartians/lefthook/releases/tag/v1.6.11