Add Deno to nix.

Chose to use nixos unstable otherwise version is lagging.
This commit is contained in:
waalge 2023-03-15 10:14:37 +00:00 committed by Lucas
parent 7e467ada2b
commit f2e5b0b89b
2 changed files with 24 additions and 2 deletions

18
flake.lock generated vendored
View File

@ -130,7 +130,8 @@
"nixpkgs": [
"cargo2nix",
"nixpkgs"
]
],
"unstable": "unstable"
}
},
"rust-overlay": {
@ -157,6 +158,21 @@
"repo": "rust-overlay",
"type": "github"
}
},
"unstable": {
"locked": {
"lastModified": 1678874551,
"narHash": "sha256-Gsq92n94Ikgmpxn7MsRhw+LXnQXo7KqgIG6tsLrpw3M=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "5979bc90e21e79c158fa9616bf405b829e0ab7b9",
"type": "github"
},
"original": {
"owner": "nixos",
"repo": "nixpkgs",
"type": "github"
}
}
},
"root": "root",

View File

@ -10,6 +10,7 @@
flake-utils.follows = "cargo2nix/flake-utils";
nixpkgs.follows = "cargo2nix/nixpkgs";
devshell.url = "github:numtide/devshell";
unstable.url = "github:nixos/nixpkgs";
};
outputs = {
@ -18,6 +19,7 @@
nixpkgs,
flake-utils,
devshell,
unstable,
}:
flake-utils.lib.eachDefaultSystem (
system: let
@ -26,6 +28,8 @@
overlays = [cargo2nix.overlays.default devshell.overlays.default];
};
deno = unstable.legacyPackages.${system}.deno;
rustPkgs = pkgs.rustBuilder.makePackageSet {
rustVersion = "1.64.0";
packageFun = import ./Cargo.nix;
@ -47,7 +51,9 @@
];
in rec {
inherit packages;
devShell = rustPkgs.workspaceShell {};
devShell = rustPkgs.workspaceShell {
packages = [deno];
};
devShells = {
aiken = pkgs.devshell.mkShell {
name = "aiken";