mirror of
https://github.com/msfjarvis/clipboard-substitutor
synced 2025-08-15 00:47:01 +05:30
feat(flakes): use numtide/devshell for Flake devShell
This commit is contained in:
parent
bf33b30f8c
commit
f10e8b2906
2 changed files with 48 additions and 5 deletions
24
flake.lock
generated
24
flake.lock
generated
|
@ -43,6 +43,29 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"devshell": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": [
|
||||||
|
"systems"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1687173957,
|
||||||
|
"narHash": "sha256-GOds2bAQcZ94fb9/Nl/aM+r+0wGSi4EKYuZYR8Dw4R8=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "devshell",
|
||||||
|
"rev": "2cf83bb31720fcc29a999aee28d6da101173e66a",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "devshell",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"fenix": {
|
"fenix": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
@ -120,6 +143,7 @@
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"advisory-db": "advisory-db",
|
"advisory-db": "advisory-db",
|
||||||
"crane": "crane",
|
"crane": "crane",
|
||||||
|
"devshell": "devshell",
|
||||||
"fenix": "fenix",
|
"fenix": "fenix",
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
|
|
29
flake.nix
29
flake.nix
|
@ -13,6 +13,10 @@
|
||||||
inputs.crane.inputs.flake-utils.follows = "flake-utils";
|
inputs.crane.inputs.flake-utils.follows = "flake-utils";
|
||||||
inputs.crane.inputs.nixpkgs.follows = "nixpkgs";
|
inputs.crane.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
|
inputs.devshell.url = "github:numtide/devshell";
|
||||||
|
inputs.devshell.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
inputs.devshell.inputs.systems.follows = "systems";
|
||||||
|
|
||||||
inputs.fenix.url = "github:nix-community/fenix";
|
inputs.fenix.url = "github:nix-community/fenix";
|
||||||
inputs.fenix.inputs.nixpkgs.follows = "nixpkgs";
|
inputs.fenix.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
|
@ -27,12 +31,16 @@
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
advisory-db,
|
advisory-db,
|
||||||
crane,
|
crane,
|
||||||
|
devshell,
|
||||||
fenix,
|
fenix,
|
||||||
flake-utils,
|
flake-utils,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
flake-utils.lib.eachDefaultSystem (system: let
|
flake-utils.lib.eachDefaultSystem (system: let
|
||||||
pkgs = import nixpkgs {inherit system;};
|
pkgs = import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
overlays = [devshell.overlays.default];
|
||||||
|
};
|
||||||
|
|
||||||
rustStable = (import fenix {inherit pkgs;}).fromToolchainFile {
|
rustStable = (import fenix {inherit pkgs;}).fromToolchainFile {
|
||||||
file = ./rust-toolchain.toml;
|
file = ./rust-toolchain.toml;
|
||||||
|
@ -74,16 +82,27 @@
|
||||||
|
|
||||||
apps.default = flake-utils.lib.mkApp {drv = clipboard-substitutor;};
|
apps.default = flake-utils.lib.mkApp {drv = clipboard-substitutor;};
|
||||||
|
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = pkgs.devshell.mkShell {
|
||||||
inputsFrom = builtins.attrValues self.checks;
|
imports = [
|
||||||
|
"${devshell}/extra/language/c.nix"
|
||||||
|
"${devshell}/extra/language/rust.nix"
|
||||||
|
];
|
||||||
|
|
||||||
nativeBuildInputs = with pkgs; [
|
env = [
|
||||||
|
{
|
||||||
|
name = "DEVSHELL_NO_MOTD";
|
||||||
|
value = 1;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
packages = with pkgs; [
|
||||||
cargo-nextest
|
cargo-nextest
|
||||||
cargo-release
|
cargo-release
|
||||||
rustStable
|
rustStable
|
||||||
];
|
];
|
||||||
|
|
||||||
CARGO_REGISTRIES_CRATES_IO_PROTOCOL = "sparse";
|
language.c.libraries = commonArgs.buildInputs;
|
||||||
|
language.rust.enableDefaultToolchain = false;
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue