This commit is contained in:
Robin Appelman 2025-09-20 14:35:15 +02:00
commit 67f2fca6f5
9 changed files with 189 additions and 0 deletions

3
nix/overlay.nix Normal file
View file

@ -0,0 +1,3 @@
final: prev: {
galton = final.callPackage ./package.nix {};
}

21
nix/package.nix Normal file
View file

@ -0,0 +1,21 @@
{
rustPlatform,
pkg-config,
lib,
}: let
inherit (lib.sources) sourceByRegex;
inherit (builtins) fromTOML readFile;
src = sourceByRegex ../. ["Cargo.*" "(src)(/.*)?"];
version = (fromTOML (readFile ../Cargo.toml)).package.version;
in
rustPlatform.buildRustPackage rec {
pname = "galton";
inherit src version;
cargoLock = {
lockFile = ../Cargo.lock;
};
meta.mainProgram = "galton";
}