summary refs log tree commit diff
path: root/pkgs/tools/system
diff options
context:
space:
mode:
authorWeijia Wang <9713184+wegank@users.noreply.github.com>2023-10-16 09:00:14 +0200
committerGitHub <noreply@github.com>2023-10-16 09:00:14 +0200
commitfb8d36459a4310d51471461123aa7798c15b7dde (patch)
tree4fcd6bd9df88dc53944162307e16e5124a317d35 /pkgs/tools/system
parenta31db09aaaf5e6412537b434b2bc92c49d7f6e7d (diff)
parent3ef85e7ba96296cea87233868e62232d4c1b54df (diff)
downloadnixpkgs-fb8d36459a4310d51471461123aa7798c15b7dde.tar
nixpkgs-fb8d36459a4310d51471461123aa7798c15b7dde.tar.gz
nixpkgs-fb8d36459a4310d51471461123aa7798c15b7dde.tar.bz2
nixpkgs-fb8d36459a4310d51471461123aa7798c15b7dde.tar.lz
nixpkgs-fb8d36459a4310d51471461123aa7798c15b7dde.tar.xz
nixpkgs-fb8d36459a4310d51471461123aa7798c15b7dde.tar.zst
nixpkgs-fb8d36459a4310d51471461123aa7798c15b7dde.zip
Merge pull request #261283 from wegank/gnufdisk-bump
gnufdisk: 2.0.0a -> 2.0.0a1
Diffstat (limited to 'pkgs/tools/system')
-rw-r--r--pkgs/tools/system/fdisk/default.nix49
1 files changed, 38 insertions, 11 deletions
diff --git a/pkgs/tools/system/fdisk/default.nix b/pkgs/tools/system/fdisk/default.nix
index e12fedd6eec..b48108ea76c 100644
--- a/pkgs/tools/system/fdisk/default.nix
+++ b/pkgs/tools/system/fdisk/default.nix
@@ -1,30 +1,57 @@
-{ fetchurl, lib, stdenv, parted, libuuid, gettext, guile }:
+{ lib
+, stdenv
+, fetchurl
+, gettext
+, guile
+, libuuid
+, parted
+}:
 
 stdenv.mkDerivation rec {
   pname = "gnufdisk";
-  version = "2.0.0a"; # .0a1 seems broken, see https://lists.gnu.org/archive/html/bug-fdisk/2012-09/msg00000.html
+  version = "2.0.0a1";
 
   src = fetchurl {
     url = "mirror://gnu/fdisk/gnufdisk-${version}.tar.gz";
-    sha256 = "04nd7civ561x2lwcmxhsqbprml3178jfc58fy1v7hzqg5k4nbhy3";
+    hash = "sha256-yWPYTf8RxBIQ//mUdC6fkKct/csEgbzEtTAiPtNRH7U=";
   };
 
-  buildInputs = [ parted libuuid gettext guile ];
+  postPatch = ''
+    sed -i "s/gnufdisk-common.h .*/\n/g" backend/configure
+  '';
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    gettext
+    guile
+  ];
+
+  buildInputs = [
+    guile
+    libuuid
+    parted
+  ];
+
+  env.NIX_CFLAGS_COMPILE = lib.concatStringsSep " " [
+    "-I../common/include"
+    "-I../debug/include"
+    "-I../exception/include"
+  ];
 
   doCheck = true;
 
   meta = {
     description = "A command-line disk partitioning tool";
-
     longDescription = ''
-      GNU fdisk provides alternatives to util-linux fdisk and util-linux
-      cfdisk.  It uses GNU Parted.
+      GNU fdisk provides a GNU version of the common disk partitioning tool
+      fdisk.  fdisk is used for the creation and manipulation of disk partition
+      tables, and it understands a variety of different formats.
     '';
-
-    license = lib.licenses.gpl3Plus;
-
     homepage = "https://www.gnu.org/software/fdisk/";
-
+    license = lib.licenses.gpl3Plus;
+    mainProgram = "gnufdisk";
+    maintainers = [ lib.maintainers.wegank ];
     platforms = lib.platforms.linux;
   };
 }