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
898737eea8
commit
bc6b1b1c8f
4 changed files with 177 additions and 125 deletions
25
package.nix
Normal file
25
package.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
stdenv,
|
||||
rustPlatform,
|
||||
coreutils,
|
||||
lib,
|
||||
}: let
|
||||
inherit (lib.sources) sourceByRegex;
|
||||
src = sourceByRegex ./. ["Cargo.*" "(src|benches)(/.*)?"];
|
||||
in
|
||||
rustPlatform.buildRustPackage rec {
|
||||
name = "palantir";
|
||||
version = "0.1.0";
|
||||
|
||||
inherit src;
|
||||
|
||||
cargoLock = {
|
||||
lockFile = ./Cargo.lock;
|
||||
};
|
||||
|
||||
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