mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 10:58:02 +00:00
24 lines
654 B
Nix
24 lines
654 B
Nix
{ lib, stdenv, rustPlatform, cargo, rustc, meson, ninja, pkg-config }:
|
|
|
|
let metadata = lib.importTOML ../Cargo.toml;
|
|
in stdenv.mkDerivation (finalAttrs: {
|
|
pname = metadata.package.name;
|
|
version = metadata.package.version;
|
|
|
|
src = lib.fileset.toSource {
|
|
root = ../.;
|
|
fileset =
|
|
lib.fileset.unions [ ../Cargo.lock ../Cargo.toml ../src ../meson.build ];
|
|
};
|
|
|
|
nativeBuildInputs =
|
|
[ meson ninja pkg-config rustPlatform.cargoSetupHook cargo rustc ];
|
|
|
|
meta = with lib; {
|
|
description = metadata.package.description;
|
|
mainProgram = metadata.package.name;
|
|
platforms = platforms.unix;
|
|
license = with licenses; [ ];
|
|
};
|
|
})
|