chore: Remove flake-utils from flake inputs
This commit is contained in:
parent
9447de3f74
commit
0dd74ac770
46
flake.lock
46
flake.lock
@ -1,30 +1,12 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"flake-utils": {
|
|
||||||
"inputs": {
|
|
||||||
"systems": "systems"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1731533236,
|
|
||||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1732238832,
|
"lastModified": 1732617236,
|
||||||
"narHash": "sha256-sQxuJm8rHY20xq6Ah+GwIUkF95tWjGRd1X8xF+Pkk38=",
|
"narHash": "sha256-PYkz6U0bSEaEB1al7O1XsqVNeSNS+s3NVclJw7YC43w=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "8edf06bea5bcbee082df1b7369ff973b91618b8d",
|
"rev": "af51545ec9a44eadf3fe3547610a5cdd882bc34e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -36,7 +18,6 @@
|
|||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils",
|
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"rust-overlay": "rust-overlay"
|
"rust-overlay": "rust-overlay"
|
||||||
}
|
}
|
||||||
@ -48,11 +29,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1732328983,
|
"lastModified": 1732674798,
|
||||||
"narHash": "sha256-RHt12f/slrzDpSL7SSkydh8wUE4Nr4r23HlpWywed9E=",
|
"narHash": "sha256-oM1gjCv9R4zxDFO3as9wqQ4FI3+pDA9MKZ72L7tTIII=",
|
||||||
"owner": "oxalica",
|
"owner": "oxalica",
|
||||||
"repo": "rust-overlay",
|
"repo": "rust-overlay",
|
||||||
"rev": "ed8aa5b64f7d36d9338eb1d0a3bb60cf52069a72",
|
"rev": "1d569430326b0a7807ccffdb2a188b814091976c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -60,21 +41,6 @@
|
|||||||
"repo": "rust-overlay",
|
"repo": "rust-overlay",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"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",
|
||||||
|
103
flake.nix
103
flake.nix
@ -3,67 +3,68 @@
|
|||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
|
||||||
rust-overlay = {
|
rust-overlay = {
|
||||||
url = "github:oxalica/rust-overlay";
|
url = "github:oxalica/rust-overlay";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { nixpkgs, flake-utils, rust-overlay, ... }:
|
outputs = { nixpkgs, rust-overlay, ... }:
|
||||||
flake-utils.lib.eachDefaultSystem (system:
|
let
|
||||||
let
|
lib = nixpkgs.lib;
|
||||||
overlays = [ (import rust-overlay) ];
|
systems = ["x86_64-linux"];
|
||||||
pkgs = import nixpkgs { inherit system overlays; };
|
forEachSystem = fn: lib.genAttrs systems (system: let
|
||||||
lib = nixpkgs.lib;
|
overlays = [ (import rust-overlay) ];
|
||||||
rust = pkgs.rust-bin;
|
pkgs = import nixpkgs { inherit system overlays; };
|
||||||
|
rustToolchain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
|
||||||
|
in fn { inherit pkgs rustToolchain; } );
|
||||||
|
in {
|
||||||
|
packages = forEachSystem ({ pkgs, rustToolchain }: let
|
||||||
|
rustPlatform = pkgs.makeRustPlatform {
|
||||||
|
cargo = rustToolchain;
|
||||||
|
rustc = rustToolchain;
|
||||||
|
};
|
||||||
|
|
||||||
rustToolchain = rust.fromRustupToolchainFile ./rust-toolchain.toml;
|
manifest = lib.importTOML ./Cargo.toml;
|
||||||
rustNightlyToolchain = rust.selectLatestNightlyWith (t: t.minimal.override {
|
packageName = manifest.package.name;
|
||||||
extensions = [ "rustfmt" ];
|
packageVersion = manifest.package.version;
|
||||||
});
|
|
||||||
rustPlatform = pkgs.makeRustPlatform {
|
package = rustPlatform.buildRustPackage {
|
||||||
cargo = rustToolchain;
|
nativeBuildInputs = [ rustToolchain ];
|
||||||
rustc = rustToolchain;
|
|
||||||
|
pname = packageName;
|
||||||
|
version = packageVersion;
|
||||||
|
src = lib.cleanSource ./.;
|
||||||
|
|
||||||
|
verbose = true;
|
||||||
|
|
||||||
|
cargoLock = {
|
||||||
|
lockFile = ./Cargo.lock;
|
||||||
|
allowBuiltinFetchGit = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
buildTools = [
|
meta = {
|
||||||
|
mainProgram = packageName;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
default = package;
|
||||||
|
${packageName} = package;
|
||||||
|
});
|
||||||
|
|
||||||
|
devShells = forEachSystem ({ pkgs, rustToolchain }: let
|
||||||
|
rustNightlyToolchain = pkgs.rust-bin.selectLatestNightlyWith (t: t.minimal.override {
|
||||||
|
extensions = [ "rustfmt" ];
|
||||||
|
});
|
||||||
|
in {
|
||||||
|
default = pkgs.mkShell {
|
||||||
|
name = "projtool";
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
rustToolchain
|
rustToolchain
|
||||||
rustNightlyToolchain
|
rustNightlyToolchain
|
||||||
];
|
];
|
||||||
|
};
|
||||||
manifest = lib.importTOML ./Cargo.toml;
|
});
|
||||||
packageName = manifest.package.name;
|
};
|
||||||
packageVersion = manifest.package.version;
|
|
||||||
|
|
||||||
package = rustPlatform.buildRustPackage {
|
|
||||||
nativeBuildInputs = buildTools;
|
|
||||||
|
|
||||||
pname = packageName;
|
|
||||||
version = packageVersion;
|
|
||||||
src = lib.cleanSource ./.;
|
|
||||||
|
|
||||||
verbose = true;
|
|
||||||
|
|
||||||
cargoLock = {
|
|
||||||
lockFile = ./Cargo.lock;
|
|
||||||
allowBuiltinFetchGit = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
mainProgram = packageName;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
packages = {
|
|
||||||
default = package;
|
|
||||||
${packageName} = package;
|
|
||||||
};
|
|
||||||
|
|
||||||
devShells.default = pkgs.mkShell {
|
|
||||||
name = "projtool";
|
|
||||||
|
|
||||||
nativeBuildInputs = buildTools;
|
|
||||||
};
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user