Move version inference logic into package.nix
This commit is contained in:
parent
bc92ad7f9f
commit
824e740fe8
|
@ -21,7 +21,6 @@
|
|||
|
||||
outputs = { self, nixpkgs, nix, ... }@inputs:
|
||||
let
|
||||
mncMeta = (builtins.fromTOML (builtins.readFile ./magic-nix-cache/Cargo.toml)).package;
|
||||
overlays = [ inputs.rust-overlay.overlays.default nix.overlays.default ];
|
||||
supportedSystems = [
|
||||
"aarch64-linux"
|
||||
|
@ -41,9 +40,7 @@
|
|||
in
|
||||
{
|
||||
packages = forEachSupportedSystem ({ pkgs, cranePkgs, ... }: rec {
|
||||
magic-nix-cache = pkgs.callPackage ./package.nix {
|
||||
inherit (mncMeta) version;
|
||||
};
|
||||
magic-nix-cache = pkgs.callPackage ./package.nix { };
|
||||
#inherit (cranePkgs) magic-nix-cache;
|
||||
default = magic-nix-cache;
|
||||
});
|
||||
|
|
|
@ -9,12 +9,11 @@
|
|||
, rust-analyzer
|
||||
, clippy
|
||||
, rustfmt
|
||||
, version
|
||||
}:
|
||||
|
||||
let
|
||||
ignoredPaths = [ ".github" "target" "book" ];
|
||||
|
||||
version = (builtins.fromTOML (builtins.readFile ./magic-nix-cache/Cargo.toml)).package.version;
|
||||
in
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "magic-nix-cache";
|
||||
|
|
Loading…
Reference in a new issue