This commit is contained in:
Robin Appelman 2025-10-12 01:33:01 +02:00
commit 907eab9601
10 changed files with 190 additions and 0 deletions

3
nix/overlay.nix Normal file
View file

@ -0,0 +1,3 @@
final: prev: {
originfox = 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 = "originfox";
inherit src version;
cargoLock = {
lockFile = ../Cargo.lock;
};
meta.mainProgram = "originfox";
}