From a75b60ea7d39026bf182e38a1ffddbeeec37e9f6 Mon Sep 17 00:00:00 2001 From: Ethan Carter Edwards Date: Sun, 28 Jun 2026 16:07:27 -0700 Subject: [PATCH] fakeroot: modernize Signed-off-by: Ethan Carter Edwards --- pkgs/by-name/fa/fakeroot/package.nix | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/pkgs/by-name/fa/fakeroot/package.nix b/pkgs/by-name/fa/fakeroot/package.nix index 993c57aab87f..8ff043709eb9 100644 --- a/pkgs/by-name/fa/fakeroot/package.nix +++ b/pkgs/by-name/fa/fakeroot/package.nix @@ -1,27 +1,29 @@ { lib, - coreutils, stdenv, fetchFromGitLab, - fetchpatch, - getopt, - libcap, - gnused, - nixosTests, - testers, autoreconfHook, po4a, + libcap, + getopt, + gnused, + coreutils, + versionCheckHook, + nixosTests, }: stdenv.mkDerivation (finalAttrs: { version = "1.38.1"; pname = "fakeroot"; + strictDeps = true; + __structuredAttrs = true; + src = fetchFromGitLab { + domain = "salsa.debian.org"; owner = "clint"; repo = "fakeroot"; - rev = "upstream/${finalAttrs.version}"; - domain = "salsa.debian.org"; + tag = "upstream/${finalAttrs.version}"; hash = "sha256-sAzXeONjDT753lbu7amQY6yXpaTNCa4wFOzB01SRbCs="; }; @@ -34,7 +36,7 @@ stdenv.mkDerivation (finalAttrs: { autoreconfHook po4a ]; - buildInputs = lib.optional stdenv.hostPlatform.isLinux libcap; + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ libcap ]; postUnpack = '' sed -i \ @@ -52,11 +54,11 @@ stdenv.mkDerivation (finalAttrs: { popd ''; + nativeInstallCheckInputs = [ versionCheckHook ]; + doInstallCheck = true; + passthru = { tests = { - version = testers.testVersion { - package = finalAttrs.finalPackage; - }; # A lightweight *unit* test that exercises fakeroot and fakechroot together: nixos-etc = nixosTests.etc.test-etc-fakeroot; };