use new deno with packages
This commit is contained in:
parent
864ace2581
commit
22e9ebc0f7
3 changed files with 33 additions and 58 deletions
65
flake.lock
generated
65
flake.lock
generated
|
|
@ -1,18 +1,12 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"deno-with-packages": {
|
"deno-with-packages": {
|
||||||
"inputs": {
|
|
||||||
"flake-utils": "flake-utils",
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1754403929,
|
"lastModified": 1757917630,
|
||||||
"narHash": "sha256-2+VxvvvOQOmidNGEbJibuYyyFufEvnr37evnZxcf7ao=",
|
"narHash": "sha256-zK0p0oq7NhBUUsfcPYS+iu2A0+HzzHJ4WxZ5MDd+Lis=",
|
||||||
"owner": "voleum-org",
|
"owner": "voleum-org",
|
||||||
"repo": "deno-with-packages",
|
"repo": "deno-with-packages",
|
||||||
"rev": "47ad6f8ad05062db9a2b3dc421f8a0ea5484ce41",
|
"rev": "26f60eb96b0d092373e4fbe0ceae1a080b8f00b6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -26,11 +20,11 @@
|
||||||
"nixpkgs-lib": "nixpkgs-lib"
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1754487366,
|
"lastModified": 1756770412,
|
||||||
"narHash": "sha256-pHYj8gUBapuUzKV/kN/tR3Zvqc7o6gdFB9XKXIp1SQ8=",
|
"narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "af66ad14b28a127c5c0f3bbb298218fc63528a18",
|
"rev": "4524271976b625a4a605beefd893f270620fd751",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -39,31 +33,28 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-utils": {
|
"flake-root": {
|
||||||
"inputs": {
|
|
||||||
"systems": "systems"
|
|
||||||
},
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1731533236,
|
"lastModified": 1723604017,
|
||||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
"narHash": "sha256-rBtQ8gg+Dn4Sx/s+pvjdq3CB2wQNzx9XGFq/JVGCB6k=",
|
||||||
"owner": "numtide",
|
"owner": "srid",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-root",
|
||||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
"rev": "b759a56851e10cb13f6b8e5698af7b59c44be26e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "numtide",
|
"owner": "srid",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-root",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1753939845,
|
"lastModified": 1757745802,
|
||||||
"narHash": "sha256-K2ViRJfdVGE8tpJejs8Qpvvejks1+A4GQej/lBk5y7I=",
|
"narHash": "sha256-hLEO2TPj55KcUFUU1vgtHE9UEIOjRcH/4QbmfHNF820=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "94def634a20494ee057c76998843c015909d6311",
|
"rev": "c23193b943c6c689d70ee98ce3128239ed9e32d1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -75,11 +66,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs-lib": {
|
"nixpkgs-lib": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1753579242,
|
"lastModified": 1754788789,
|
||||||
"narHash": "sha256-zvaMGVn14/Zz8hnp4VWT9xVnhc8vuL3TStRqwk22biA=",
|
"narHash": "sha256-x2rJ+Ovzq0sCMpgfgGaaqgBSwY+LST+WbZ6TytnT9Rk=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixpkgs.lib",
|
"repo": "nixpkgs.lib",
|
||||||
"rev": "0f36c44e01a6129be94e3ade315a5883f0228a6e",
|
"rev": "a73b9c743612e4244d865a2fdee11865283c04e6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -92,23 +83,9 @@
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"deno-with-packages": "deno-with-packages",
|
"deno-with-packages": "deno-with-packages",
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts",
|
||||||
|
"flake-root": "flake-root",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"systems": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1681028828,
|
|
||||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|
|
||||||
17
flake.nix
17
flake.nix
|
|
@ -4,29 +4,34 @@
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
|
flake-root.url = "github:srid/flake-root";
|
||||||
deno-with-packages.url = "github:voleum-org/deno-with-packages";
|
deno-with-packages.url = "github:voleum-org/deno-with-packages";
|
||||||
deno-with-packages.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } {
|
outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } {
|
||||||
imports = [
|
imports = [
|
||||||
|
inputs.flake-root.flakeModule
|
||||||
|
inputs.deno-with-packages.flakeModule
|
||||||
];
|
];
|
||||||
systems = [ "x86_64-linux" ];
|
systems = [ "x86_64-linux" ];
|
||||||
perSystem = { self', pkgs, config, system, ... }: let
|
perSystem = { self', pkgs, config, system, ... }: let
|
||||||
lib = import ./nix // inputs.deno-with-packages.lib.${system};
|
lib = import ./nix;
|
||||||
shelf = import ./shelf {
|
shelf = import ./shelf {
|
||||||
inherit pkgs system lib;
|
inherit pkgs system lib;
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
|
deno = {
|
||||||
|
enable = true;
|
||||||
|
lockfiles = shelf.lockfiles;
|
||||||
|
};
|
||||||
|
|
||||||
packages.website =
|
packages.website =
|
||||||
import ./nix/website.nix { inherit pkgs; root = ./.; };
|
import ./nix/website.nix { inherit pkgs; root = ./.; };
|
||||||
|
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = pkgs.mkShell {
|
||||||
buildInputs = with pkgs; [ deno pandoc reuse ];
|
buildInputs = with pkgs; [ config.packages.deno pandoc reuse ];
|
||||||
|
inputsFrom = [ config.flake-root.devShell ];
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
export DENO_DIR=$PWD/.deno_cache
|
|
||||||
${shelf.setupScript}/bin/install-deno-cache
|
|
||||||
|
|
||||||
echo "Available scrolls:"
|
echo "Available scrolls:"
|
||||||
echo ${pkgs.lib.escapeShellArg (builtins.toJSON shelf.scrolls)} | jq .
|
echo ${pkgs.lib.escapeShellArg (builtins.toJSON shelf.scrolls)} | jq .
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
|
|
@ -11,16 +11,9 @@ let
|
||||||
scrolls = builtins.map mkScroll scrollDirs;
|
scrolls = builtins.map mkScroll scrollDirs;
|
||||||
|
|
||||||
lockfiles = builtins.map (s: s.build.lockFile) scrolls;
|
lockfiles = builtins.map (s: s.build.lockFile) scrolls;
|
||||||
|
|
||||||
denoSharedCache = lib.denoSharedCache {
|
|
||||||
inherit pkgs lockfiles;
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
setupScript = lib.installDenoCache {
|
inherit lockfiles;
|
||||||
inherit pkgs;
|
|
||||||
cache = denoSharedCache;
|
|
||||||
};
|
|
||||||
|
|
||||||
scrolls =
|
scrolls =
|
||||||
builtins.map (s: builtins.removeAttrs s [ "build" ]) scrolls;
|
builtins.map (s: builtins.removeAttrs s [ "build" ]) scrolls;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue