1 { lib, stdenv, fetchFromGitLab, dtc, installShellFiles }:
3 stdenv.mkDerivation rec {
5 version = "unstable-2022-03-26";
7 src = fetchFromGitLab {
8 owner = "DarkElvenAngel";
10 rev = "97c4fa07fc2c09ffc3bd86e0f6319d50fa639578";
11 sha256 = "sha256-5/xUYbprRiwD+FN8V2cUpHxnTbBkEsFG2wfsEXrCrgQ=";
14 patches = [ ./fix-hardcoded-reboot-poweroff-paths.patch ];
17 patchShebangs configure
20 nativeBuildInputs = [ installShellFiles ];
22 buildInputs = [ dtc ];
27 install -Dm755 build/argononed $out/bin/argononed
28 install -Dm755 build/argonone-cli $out/bin/argonone-cli
29 install -Dm755 build/argonone-shutdown $out/lib/systemd/system-shutdown/argonone-shutdown
30 install -Dm644 build/argonone.dtbo $out/boot/overlays/argonone.dtbo
32 install -Dm644 OS/_common/argononed.service $out/lib/systemd/system/argononed.service
33 install -Dm644 OS/_common/argononed.logrotate $out/etc/logrotate.d/argononed
34 install -Dm644 LICENSE $out/share/argononed/LICENSE
36 installShellCompletion --bash --name argonone-cli OS/_common/argonone-cli-complete.bash
42 homepage = "https://gitlab.com/DarkElvenAngel/argononed";
43 description = "A replacement daemon for the Argon One Raspberry Pi case";
44 license = licenses.mit;
45 platforms = platforms.linux;
46 maintainers = [ maintainers.misterio77 ];