Files
nixpkgs/pkgs/by-name/tu/turnon/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

78 lines
1.7 KiB
Nix

{
lib,
stdenv,
fetchFromGitea,
rustPlatform,
cairo,
pango,
pkg-config,
libadwaita,
blueprint-compiler,
wrapGAppsHook4,
gsettings-desktop-schemas,
just,
}:
let
version = "2.7.4";
in
rustPlatform.buildRustPackage {
pname = "turnon";
version = version;
src = fetchFromGitea {
domain = "codeberg.org";
owner = "swsnr";
repo = "turnon";
rev = "v${version}";
hash = "sha256-RTLFajUMJHZoXKhy83G3c7a2fZ+P6CZXadFpbcPFLY8=";
};
cargoHash = "sha256-8vqsQPbl3c2++8T5bjDjAWzm00qSDogT1YaumOC7qzk=";
doCheck = true;
checkFlags = [
# Skipped due to "Permission denied (os error 13)"
"--skip=net::ping::tests::ping_loopback_ipv4"
"--skip=net::ping::tests::ping_loopback_ipv6"
"--skip=net::ping::tests::ping_with_timeout_unroutable"
];
nativeBuildInputs = [
cairo
pango
pkg-config
blueprint-compiler
wrapGAppsHook4
just
];
buildInputs = [
libadwaita
gsettings-desktop-schemas
];
strictDeps = true;
postPatch = ''
substituteInPlace justfile \
--replace-fail "version := \`git describe\`" "version := \"${version}\"" \
--replace-fail "DESTPREFIX := '/app'" "DESTPREFIX := '$out'" \
--replace-fail "just --list" "just compile" # Replacing the default recipe with the compile command as just-hook-buildPhase runs the default recipe to compile the package.
'';
postBuild = ''
cargo build --release
'';
meta = {
description = "Turn on devices in your local network";
homepage = "https://codeberg.org/swsnr/turnon";
license = lib.licenses.eupl12;
maintainers = with lib.maintainers; [ mksafavi ];
mainProgram = "de.swsnr.turnon";
platforms = lib.platforms.linux;
};
}