mirror of
https://codeberg.org/demostf/cleanup.git
synced 2026-06-04 18:44:11 +02:00
nix setup
This commit is contained in:
parent
7640ec5a79
commit
28ba46ec1a
8 changed files with 301 additions and 1 deletions
31
nix/package.nix
Normal file
31
nix/package.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
rustPlatform,
|
||||
lib,
|
||||
openssl,
|
||||
pkg-config,
|
||||
}: let
|
||||
inherit (lib.sources) sourceByRegex;
|
||||
inherit (builtins) fromTOML readFile;
|
||||
src = sourceByRegex ../. ["Cargo.*" "(src)(/.*)?"];
|
||||
cargoPackage = (fromTOML (readFile ../Cargo.toml)).package;
|
||||
in
|
||||
rustPlatform.buildRustPackage {
|
||||
pname = cargoPackage.name;
|
||||
inherit (cargoPackage) version;
|
||||
|
||||
inherit src;
|
||||
|
||||
buildInputs = [
|
||||
openssl
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
];
|
||||
|
||||
cargoLock = {
|
||||
lockFile = ../Cargo.lock;
|
||||
};
|
||||
|
||||
meta.mainProgram = "cleanup";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue