mirror of
https://codeberg.org/icewind/palantir.git
synced 2026-06-03 10:14:09 +02:00
flake reorg
This commit is contained in:
parent
effc4641ad
commit
a9356910c9
9 changed files with 174 additions and 294 deletions
41
package.nix
41
package.nix
|
|
@ -1,28 +1,29 @@
|
|||
{
|
||||
stdenv,
|
||||
rustPlatform,
|
||||
coreutils,
|
||||
lib,
|
||||
}: let
|
||||
{ stdenv
|
||||
, rustPlatform
|
||||
, coreutils
|
||||
, lib
|
||||
,
|
||||
}:
|
||||
let
|
||||
inherit (lib.sources) sourceByRegex;
|
||||
inherit (builtins) fromTOML readFile;
|
||||
src = sourceByRegex ./. ["Cargo.*" "(src|benches)(/.*)?"];
|
||||
src = sourceByRegex ./. [ "Cargo.*" "(src|benches)(/.*)?" ];
|
||||
version = (fromTOML (readFile ./Cargo.toml)).package.version;
|
||||
in
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "palantir";
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "palantir";
|
||||
|
||||
inherit src version;
|
||||
inherit src version;
|
||||
|
||||
cargoLock = {
|
||||
lockFile = ./Cargo.lock;
|
||||
};
|
||||
cargoLock = {
|
||||
lockFile = ./Cargo.lock;
|
||||
};
|
||||
|
||||
doCheck = false;
|
||||
doCheck = false;
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/lib/udev/rules.d/
|
||||
echo 'SUBSYSTEM=="powercap", ACTION=="add", RUN+="${coreutils}/bin/chgrp -R powermonitoring /sys%p", RUN+="${coreutils}/bin/chmod -R g=u /sys%p"' >> $out/lib/udev/rules.d/51-palantir.rules
|
||||
echo 'SUBSYSTEM=="powercap", ACTION=="change", ENV{TRIGGER}!="none", RUN+="${coreutils}/bin/chgrp -R powermonitoring /sys%p", RUN+="${coreutils}/bin/chmod -R g=u /sys%p"' >> $out/lib/udev/rules.d/51-palantir.rules
|
||||
'';
|
||||
}
|
||||
postInstall = ''
|
||||
mkdir -p $out/lib/udev/rules.d/
|
||||
echo 'SUBSYSTEM=="powercap", ACTION=="add", RUN+="${coreutils}/bin/chgrp -R powermonitoring /sys%p", RUN+="${coreutils}/bin/chmod -R g=u /sys%p"' >> $out/lib/udev/rules.d/51-palantir.rules
|
||||
echo 'SUBSYSTEM=="powercap", ACTION=="change", ENV{TRIGGER}!="none", RUN+="${coreutils}/bin/chgrp -R powermonitoring /sys%p", RUN+="${coreutils}/bin/chmod -R g=u /sys%p"' >> $out/lib/udev/rules.d/51-palantir.rules
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue