summary refs log tree commit diff
path: root/pkgs/tools/system
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/system')
-rw-r--r--pkgs/tools/system/collectd/data.nix10
-rw-r--r--pkgs/tools/system/fakechroot/default.nix9
-rw-r--r--pkgs/tools/system/fakeroot/default.nix65
-rw-r--r--pkgs/tools/system/iops/default.nix29
-rw-r--r--pkgs/tools/system/thinkfan/default.nix4
5 files changed, 35 insertions, 82 deletions
diff --git a/pkgs/tools/system/collectd/data.nix b/pkgs/tools/system/collectd/data.nix
index 3867bd6bb3d..52e394db40b 100644
--- a/pkgs/tools/system/collectd/data.nix
+++ b/pkgs/tools/system/collectd/data.nix
@@ -1,14 +1,14 @@
 { stdenv, collectd }:
 
 stdenv.mkDerivation {
-  inherit (collectd) meta version;
-
   pname = "collectd-data";
+  inherit (collectd) meta src version;
 
-  dontUnpack = true;
+  dontConfigure = true;
+  dontBuild = true;
+  dontFixup = true;
 
   installPhase = ''
-    mkdir -p $out/share/collectd
-    cp ${collectd}/share/collectd/*.{db,conf} $out/share/collectd/
+    install -Dm444 -t $out/share/collectd/ src/*.{db,conf}
   '';
 }
diff --git a/pkgs/tools/system/fakechroot/default.nix b/pkgs/tools/system/fakechroot/default.nix
index 382a47039ba..fd8fa04d21d 100644
--- a/pkgs/tools/system/fakechroot/default.nix
+++ b/pkgs/tools/system/fakechroot/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, perl }:
+{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, nixosTests, perl }:
 
 stdenv.mkDerivation rec {
   pname = "fakechroot";
@@ -44,6 +44,13 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ autoreconfHook ];
   buildInputs = [ perl ];
 
+  passthru = {
+    tests = {
+      # A lightweight *unit* test that exercises fakeroot and fakechroot together:
+      nixos-etc = nixosTests.etc.test-etc-fakeroot;
+    };
+  };
+
   meta = with lib; {
     homepage = "https://github.com/dex4er/fakechroot";
     description = "Give a fake chroot environment through LD_PRELOAD";
diff --git a/pkgs/tools/system/fakeroot/default.nix b/pkgs/tools/system/fakeroot/default.nix
index c4d3845df80..bbf0dc2b080 100644
--- a/pkgs/tools/system/fakeroot/default.nix
+++ b/pkgs/tools/system/fakeroot/default.nix
@@ -1,47 +1,28 @@
-{ lib, stdenv, fetchurl, fetchpatch, getopt, libcap, gnused }:
+{ lib
+, stdenv
+, fetchurl
+, fetchpatch
+, getopt
+, libcap
+, gnused
+, nixosTests
+}:
 
 stdenv.mkDerivation rec {
-  version = "1.23";
+  version = "1.27";
   pname = "fakeroot";
 
   src = fetchurl {
-    url = "http://http.debian.net/debian/pool/main/f/fakeroot/fakeroot_${version}.orig.tar.xz";
-    sha256 = "1xpl0s2yjyjwlf832b6kbkaa5921liybaar13k7n45ckd9lxd700";
+    url = "http://http.debian.net/debian/pool/main/f/fakeroot/fakeroot_${version}.orig.tar.gz";
+    sha256 = "1p5d3jq6l1pzk96agkf05dck7dbgvldx5sg2d4h7d8h230nyni9w";
   };
 
   patches = lib.optionals stdenv.isLinux [
     ./einval.patch
-
-    # glibc 2.33 patches from ArchLinux
-    (fetchpatch {
-      url = "https://raw.githubusercontent.com/archlinux/svntogit-packages/15b01cf37ff64c487f7440df4e09b090cd93b58f/fakeroot/trunk/fakeroot-1.25.3-glibc-2.33-fix-1.patch";
-      sha256 = "sha256-F6BcxYInSLu7Fxg6OmMZDhTWoLqsc//yYPlTZqQQl68=";
-    })
-    (fetchpatch {
-      url = "https://raw.githubusercontent.com/archlinux/svntogit-packages/15b01cf37ff64c487f7440df4e09b090cd93b58f/fakeroot/trunk/fakeroot-1.25.3-glibc-2.33-fix-2.patch";
-      sha256 = "sha256-ifpJxhk6MyQpFolC1hIAAUjcHmOHVU1D25tRwpu2S/k=";
-    })
-    (fetchpatch {
-      url = "https://raw.githubusercontent.com/archlinux/svntogit-packages/15b01cf37ff64c487f7440df4e09b090cd93b58f/fakeroot/trunk/fakeroot-1.25.3-glibc-2.33-fix-3.patch";
-      sha256 = "sha256-o2Xm4C64Ny9TL8fjsZltjO1CdJ4VGwqZ+LnufVL5Sq8=";
-    })
-  ]
-  # patchset from brew
-  ++ lib.optionals stdenv.isDarwin [
     (fetchpatch {
-      name = "0001-Implement-openat-2-wrapper-which-handles-optional-ar.patch";
-      url = "https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=0001-Implement-openat-2-wrapper-which-handles-optional-ar.patch;att=1;bug=766649";
-      sha256 = "1m6ggrqwqy0in264sxqk912vniipiw629dxq7kibakvsswfk6bkk";
-    })
-    (fetchpatch {
-      name = "0002-OS-X-10.10-introduced-id_t-int-in-gs-etpriority.patch";
-      url = "https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=0002-OS-X-10.10-introduced-id_t-int-in-gs-etpriority.patch;att=2;bug=766649";
-      sha256 = "0rhayp42x4i1a6yc4d28kpshmf7lrmaprq64zfrjpdn4kbs0rkln";
-    })
-    (fetchpatch {
-      name = "fakeroot-always-pass-mode.patch";
-      url = "https://bugs.debian.org/cgi-bin/bugreport.cgi?att=2;bug=766649;filename=fakeroot-always-pass-mode.patch;msg=20";
-      sha256 = "0i3zaca1v449dm9m1cq6wq4dy6hc2y04l05m9gg8d4y4swld637p";
+      name = "also-wrap-stat-library-call.patch";
+      url = "https://sources.debian.org/data/main/f/fakeroot/1.27-1/debian/patches/also-wrap-stat-library-call.patch";
+      sha256 = "0p7lq6m31k3rqsnjbi06a8ykdqa3cp4y5ngsjyk3q1269gx59x8b";
     })
   ];
 
@@ -53,17 +34,12 @@ stdenv.mkDerivation rec {
     sed -i -e "s@getopt@$(type -p getopt)@g" -e "s@sed@$(type -p sed)@g" ${pname}-${version}/scripts/fakeroot.in
   '';
 
-  postConfigure = let
-    # additional patch from brew, but needs to be applied to a generated file
-    patch-wraptmpf = fetchpatch {
-      name = "fakeroot-patch-wraptmpf-h.patch";
-      url = "https://bugs.debian.org/cgi-bin/bugreport.cgi?att=3;bug=766649;filename=fakeroot-patch-wraptmpf-h.patch;msg=20";
-      sha256 = "1jhsi4bv6nnnjb4vmmmbhndqg719ckg860hgw98bli8m05zwbx6a";
+  passthru = {
+    tests = {
+      # A lightweight *unit* test that exercises fakeroot and fakechroot together:
+      nixos-etc = nixosTests.etc.test-etc-fakeroot;
     };
-  in lib.optional stdenv.isDarwin ''
-    make wraptmpf.h
-    patch -p1 < ${patch-wraptmpf}
-  '';
+  };
 
   meta = {
     homepage = "https://salsa.debian.org/clint/fakeroot";
@@ -72,5 +48,4 @@ stdenv.mkDerivation rec {
     maintainers = with lib.maintainers; [viric];
     platforms = lib.platforms.unix;
   };
-
 }
diff --git a/pkgs/tools/system/iops/default.nix b/pkgs/tools/system/iops/default.nix
deleted file mode 100644
index b2be488673e..00000000000
--- a/pkgs/tools/system/iops/default.nix
+++ /dev/null
@@ -1,29 +0,0 @@
-{ lib, stdenv, fetchurl }:
-
-stdenv.mkDerivation rec {
-  pname = "iops";
-  version = "0.1";
-
-  src = fetchurl {
-    url = "https://www.vanheusden.com/iops/${pname}-${version}.tgz";
-    sha256 = "1knih6dwwiicycp5ml09bj3k8j7air9bng070sfnxwfv786y90bz";
-  };
-
-  installPhase = ''
-    mkdir -p $out/bin
-    cp iops $out/bin
-  '';
-
-  meta = with lib; {
-    description = "Measure I/O operations per second of a storage device";
-    longDescription = ''
-      Iops lets you measure how many I/O operations per second a storage device can perform.
-      Usefull for determing e.g. the best RAID-setting of your storage device.
-    '';
-    homepage = "http://www.vanheusden.com/iops/";
-    license = licenses.gpl2;
-    maintainers = with maintainers; [ davidak ];
-    platforms = platforms.linux; # build problems on Darwin
-  };
-}
-
diff --git a/pkgs/tools/system/thinkfan/default.nix b/pkgs/tools/system/thinkfan/default.nix
index 8da87ecfa71..a564c946bcf 100644
--- a/pkgs/tools/system/thinkfan/default.nix
+++ b/pkgs/tools/system/thinkfan/default.nix
@@ -11,13 +11,13 @@
 
 stdenv.mkDerivation rec {
   pname = "thinkfan";
-  version = "1.3.0";
+  version = "1.3.1";
 
   src = fetchFromGitHub {
     owner = "vmatare";
     repo = "thinkfan";
     rev = version;
-    sha256 = "sha256-ZCZqi7A4qdWtDSkTw6ktHIZnPhdes2AX7+QBroaDDfI=";
+    sha256 = "sha256-aREZv+t4QhtfLKOMrneLiRxgnu0fzB8UV8dvr1dnhx4=";
   };
 
   postPatch = ''