Files
nixpkgs/pkgs/by-name/fe/ferrishot/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

70 lines
1.6 KiB
Nix

{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
makeBinaryWrapper,
writableTmpDirAsHomeHook,
libGL,
libX11,
libxkbcommon,
libxcb,
wayland,
nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "ferrishot";
version = "0.2.0";
src = fetchFromGitHub {
owner = "nik-rev";
repo = "ferrishot";
tag = "v${finalAttrs.version}";
hash = "sha256-QnIHLkxqL/4s6jgIbGmzR5tqCjH7yJcfpx0AhdxqVKc=";
};
cargoHash = "sha256-TJWS8LzLTQSr+0uw0x38mNJrjYvMzr90URYI8UcRQqc=";
nativeBuildInputs = [
makeBinaryWrapper
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# error: unable to open output file '/homeless-shelter/.cache/clang/ModuleCache/354UBE8EJRBZ3/Cocoa-31YYBL2V1XGQP.pcm': 'No such file or directory'
writableTmpDirAsHomeHook
];
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
libxcb
];
postInstall =
let
runtimeDeps = [
libGL
]
++ lib.optionals stdenv.hostPlatform.isLinux [
libX11
libxkbcommon
wayland
];
in
''
wrapProgram $out/bin/ferrishot \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath runtimeDeps}"
'';
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "Screenshot app written in Rust";
homepage = "https://github.com/nik-rev/ferrishot";
changelog = "https://github.com/nik-rev/ferrishot/blob/v${finalAttrs.version}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ GaetanLepage ];
mainProgram = "ferrishot";
};
})