maybe actually fix the rust-overlay thing?
This commit is contained in:
parent
89630d55de
commit
a6b7dae4d8
22
flake.lock
22
flake.lock
|
@ -1,23 +1,5 @@
|
||||||
{
|
{
|
||||||
"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": 1756787288,
|
"lastModified": 1756787288,
|
||||||
|
@ -52,9 +34,9 @@
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils",
|
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"rust-overlays": "rust-overlays"
|
"rust-overlays": "rust-overlays",
|
||||||
|
"systems": "systems"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rust-overlays": {
|
"rust-overlays": {
|
||||||
|
|
43
flake.nix
43
flake.nix
|
@ -3,46 +3,49 @@
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
systems.url = "github:nix-systems/default";
|
||||||
rust-overlays.url = "github:oxalica/rust-overlay";
|
rust-overlays.url = "github:oxalica/rust-overlay";
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, flake-utils, rust-overlays, ...}:
|
outputs = { self, systems, nixpkgs, rust-overlays, ...}: let
|
||||||
flake-utils.lib.eachDefaultSystem (system: let
|
inherit (nixpkgs) lib;
|
||||||
pkgs = import nixpkgs {
|
eachSystem = lib.genAttrs (import systems);
|
||||||
|
pkgsFor = eachSystem (system: import nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
overlays = [
|
overlays = [
|
||||||
(import rust-overlays)
|
|
||||||
self.overlays.default
|
self.overlays.default
|
||||||
|
(import rust-overlays)
|
||||||
];
|
];
|
||||||
};
|
});
|
||||||
|
|
||||||
rust = pkgs.rust-bin.stable.latest.default;
|
|
||||||
in {
|
in {
|
||||||
devShells.default =
|
devShells = eachSystem (system: let
|
||||||
pkgs.mkShell {
|
pkgs = pkgsFor.${system};
|
||||||
|
rust = pkgs.rust-bin.stable.latest.default;
|
||||||
|
in {
|
||||||
|
default = pkgs.mkShell {
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
pkg-config
|
pkg-config
|
||||||
git
|
git
|
||||||
rust
|
rust
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
});
|
||||||
|
|
||||||
packages = rec {
|
packages = eachSystem (system: rec {
|
||||||
inherit (pkgs) duralumin duralumin-keygen;
|
inherit (pkgsFor.${system}) duralumin duralumin-keygen;
|
||||||
default = duralumin;
|
default = duralumin;
|
||||||
};
|
});
|
||||||
}) // {
|
|
||||||
overlays.default = final: prev: let
|
overlays.default = final: _prev: let
|
||||||
toolchain = prev.rust-bin.stable.latest.default;
|
toolchain = pkgsFor.${final.system}.rust-bin.stable.latest.default;
|
||||||
rustPlatform = final.makeRustPlatform {
|
rustPlatform = final.makeRustPlatform {
|
||||||
cargo = toolchain;
|
cargo = toolchain;
|
||||||
rustc = toolchain;
|
rustc = toolchain;
|
||||||
};
|
};
|
||||||
in {
|
in rec {
|
||||||
duralumin = prev.callPackage ./pkgs/package.nix { inherit rustPlatform; };
|
duralumin = final.callPackage ./pkgs/package.nix { inherit rustPlatform; };
|
||||||
duralumin-keygen = prev.callPackage ./pkgs/keygen.nix {
|
duralumin-keygen = final.callPackage ./pkgs/keygen.nix {
|
||||||
inherit (final) duralumin;
|
inherit duralumin;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue