2022-03-30 09:31:56 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitLab
|
2024-07-27 06:49:29 +00:00
|
|
|
, buildPackages
|
2023-05-24 13:37:59 +00:00
|
|
|
, cargo
|
2022-03-30 09:31:56 +00:00
|
|
|
, gettext
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, rustPlatform
|
2023-05-24 13:37:59 +00:00
|
|
|
, rustc
|
2022-06-16 17:23:12 +00:00
|
|
|
, wrapGAppsHook4
|
2022-03-30 09:31:56 +00:00
|
|
|
, appstream-glib
|
|
|
|
, desktop-file-utils
|
|
|
|
, glib
|
|
|
|
, gtk4
|
2023-05-24 13:37:59 +00:00
|
|
|
, gdk-pixbuf
|
2022-03-30 09:31:56 +00:00
|
|
|
, libadwaita
|
2022-10-30 15:09:59 +00:00
|
|
|
, Foundation
|
2022-03-30 09:31:56 +00:00
|
|
|
}:
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2022-03-30 09:31:56 +00:00
|
|
|
pname = "gnome-obfuscate";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "0.0.10";
|
2022-03-30 09:31:56 +00:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "gitlab.gnome.org";
|
|
|
|
owner = "World";
|
|
|
|
repo = "Obfuscate";
|
2024-04-21 15:54:59 +00:00
|
|
|
rev = finalAttrs.version;
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-/Plvvn1tle8t/bsPcsamn5d81CqnyGCyGYPF6j6U5NI=";
|
2022-03-30 09:31:56 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
2024-04-21 15:54:59 +00:00
|
|
|
inherit (finalAttrs) src;
|
|
|
|
name = "${finalAttrs.pname}-${finalAttrs.version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-9lrxK2psdIPGsOC6p8T+3AGPrX6PjrK9mFirdJqBSMM=";
|
2022-03-30 09:31:56 +00:00
|
|
|
};
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
env = lib.optionalAttrs stdenv.isDarwin {
|
|
|
|
# Set the location to gettext to ensure the nixpkgs one on Darwin instead of the vendored one.
|
|
|
|
# The vendored gettext does not build with clang 16.
|
|
|
|
GETTEXT_BIN_DIR = "${lib.getBin buildPackages.gettext}/bin";
|
|
|
|
GETTEXT_INCLUDE_DIR = "${lib.getDev gettext}/include";
|
|
|
|
GETTEXT_LIB_DIR = "${lib.getLib gettext}/lib";
|
|
|
|
};
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
gettext
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
rustPlatform.cargoSetupHook
|
2023-05-24 13:37:59 +00:00
|
|
|
cargo
|
|
|
|
rustc
|
2022-06-16 17:23:12 +00:00
|
|
|
wrapGAppsHook4
|
2023-05-24 13:37:59 +00:00
|
|
|
appstream-glib
|
|
|
|
desktop-file-utils
|
2022-03-30 09:31:56 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
glib
|
|
|
|
gtk4
|
2023-05-24 13:37:59 +00:00
|
|
|
gdk-pixbuf
|
2022-03-30 09:31:56 +00:00
|
|
|
libadwaita
|
2022-10-30 15:09:59 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
Foundation
|
2022-03-30 09:31:56 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Censor private information";
|
|
|
|
homepage = "https://gitlab.gnome.org/World/obfuscate";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.all;
|
2023-05-24 13:37:59 +00:00
|
|
|
mainProgram = "obfuscate";
|
|
|
|
maintainers = with maintainers; [ fgaz ];
|
2022-03-30 09:31:56 +00:00
|
|
|
};
|
2024-04-21 15:54:59 +00:00
|
|
|
})
|