From 5897b36528399c53aa4d8aafd57e7356c9120565 Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Sat, 30 Dec 2023 11:34:05 -0300 Subject: [PATCH 1/7] disk-filltest: migrate to by-name --- .../default.nix => by-name/di/disk-filltest/package.nix} | 0 pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 2 deletions(-) rename pkgs/{tools/system/disk-filltest/default.nix => by-name/di/disk-filltest/package.nix} (100%) diff --git a/pkgs/tools/system/disk-filltest/default.nix b/pkgs/by-name/di/disk-filltest/package.nix similarity index 100% rename from pkgs/tools/system/disk-filltest/default.nix rename to pkgs/by-name/di/disk-filltest/package.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 056bada2b343..0ead6bc38d0b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5136,8 +5136,6 @@ with pkgs; disfetch = callPackage ../tools/misc/disfetch { }; - disk-filltest = callPackage ../tools/system/disk-filltest { }; - disk-inventory-x = callPackage ../tools/filesystems/disk-inventory-x { }; diskscan = callPackage ../tools/misc/diskscan { }; From 2aca1fc81d8e85c9d5a7136edd4afb66eed42aad Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Sat, 30 Dec 2023 11:35:11 -0300 Subject: [PATCH 2/7] disk-filltest: adopt - finalAttrs design pattern - split outputs - makeFlags instead of patches and fixups --- pkgs/by-name/di/disk-filltest/package.nix | 46 ++++++++++++----------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/pkgs/by-name/di/disk-filltest/package.nix b/pkgs/by-name/di/disk-filltest/package.nix index aeef6732236f..5d97977aab01 100644 --- a/pkgs/by-name/di/disk-filltest/package.nix +++ b/pkgs/by-name/di/disk-filltest/package.nix @@ -1,39 +1,43 @@ -{ lib, stdenv, fetchFromGitHub }: +{ lib +, stdenv +, fetchFromGitHub +}: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "disk-filltest"; version = "0.8.2"; src = fetchFromGitHub { owner = "bingmann"; repo = "disk-filltest"; - rev = "v${version}"; - sha256 = "0qmcf5k5j7946wsbxrw4rqfj48mwl3r6kb4l3gppl97k7iyni6kj"; + rev = "v${finalAttrs.version}"; + hash = "sha256-cppofTzzJHrvG5SsafKgvCIiHc6E5740NyQdWWZxrGI="; }; - preBuild = '' - substituteInPlace Makefile --replace 'prefix = /usr/local' 'prefix = $(out)' - ''; + outputs = [ "out" "doc" "man" ]; + + makeFlags = [ + "CC=${stdenv.cc.targetPrefix}cc" + "prefix=${placeholder "out"}" + "man1dir=${placeholder "man"}/share/man/man1" + ]; postInstall = '' - install -D -m0644 -t $out/share/doc COPYING README - mkdir -p $out/share/man; mv $out/man1 $out/share/man + install -D -m0644 -t $doc/share/doc/disk-filltest README ''; - meta = with lib; { + meta = { + homepage = "https://panthema.net/2013/disk-filltest"; description = "Simple program to detect bad disks by filling them with random data"; longDescription = '' - disk-filltest is a tool to check storage disks for coming - failures by write files with pseudo-random data to the current - directory until the disk is full, read the files again - and verify the sequence written. It also can measure - read/write speed while filling the disk. + disk-filltest is a tool to check storage disks for coming failures by + write files with pseudo-random data to the current directory until the + disk is full, read the files again and verify the sequence written. It + also can measure read/write speed while filling the disk. ''; - homepage = "https://panthema.net/2013/disk-filltest"; - license = licenses.gpl3; - maintainers = with maintainers; [ caadar ]; - platforms = platforms.all; + license = lib.licenses.gpl3Plus; mainProgram = "disk-filltest"; + maintainers = with lib.maintainers; [ AndersonTorres ]; + platforms = lib.platforms.all; }; - -} +}) From d76236da522f95e8728151a54b7371b77b7dbdb3 Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Sat, 30 Dec 2023 12:00:08 -0300 Subject: [PATCH 3/7] gtklp: migrate to by-name --- .../misc/gtklp/default.nix => by-name/gt/gtklp/package.nix} | 0 pkgs/{tools/misc => by-name/gt}/gtklp/patches/autoconf.patch | 0 .../misc => by-name/gt}/gtklp/patches/mdv-fix-str-fmt.patch | 0 pkgs/top-level/all-packages.nix | 2 -- 4 files changed, 2 deletions(-) rename pkgs/{tools/misc/gtklp/default.nix => by-name/gt/gtklp/package.nix} (100%) rename pkgs/{tools/misc => by-name/gt}/gtklp/patches/autoconf.patch (100%) rename pkgs/{tools/misc => by-name/gt}/gtklp/patches/mdv-fix-str-fmt.patch (100%) diff --git a/pkgs/tools/misc/gtklp/default.nix b/pkgs/by-name/gt/gtklp/package.nix similarity index 100% rename from pkgs/tools/misc/gtklp/default.nix rename to pkgs/by-name/gt/gtklp/package.nix diff --git a/pkgs/tools/misc/gtklp/patches/autoconf.patch b/pkgs/by-name/gt/gtklp/patches/autoconf.patch similarity index 100% rename from pkgs/tools/misc/gtklp/patches/autoconf.patch rename to pkgs/by-name/gt/gtklp/patches/autoconf.patch diff --git a/pkgs/tools/misc/gtklp/patches/mdv-fix-str-fmt.patch b/pkgs/by-name/gt/gtklp/patches/mdv-fix-str-fmt.patch similarity index 100% rename from pkgs/tools/misc/gtklp/patches/mdv-fix-str-fmt.patch rename to pkgs/by-name/gt/gtklp/patches/mdv-fix-str-fmt.patch diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0ead6bc38d0b..c4337dee1a40 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3977,8 +3977,6 @@ with pkgs; glyr = callPackage ../tools/audio/glyr { }; - gtklp = callPackage ../tools/misc/gtklp { }; - google-amber = callPackage ../tools/graphics/amber { inherit (darwin) cctools; }; From 61031595bdf49cbb7b95b5e5bbe73f3561127659 Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Sat, 30 Dec 2023 12:01:30 -0300 Subject: [PATCH 4/7] gtklp: adopt - finalAttrs design pattern - split outputs - strictDeps - remove nested with - set meta.mainProgram --- .../autoconf.patch => 000-autoconf.patch} | 0 ...r-fmt.patch => 001-format-parameter.patch} | 0 pkgs/by-name/gt/gtklp/package.nix | 56 ++++++++++++------- 3 files changed, 35 insertions(+), 21 deletions(-) rename pkgs/by-name/gt/gtklp/{patches/autoconf.patch => 000-autoconf.patch} (100%) rename pkgs/by-name/gt/gtklp/{patches/mdv-fix-str-fmt.patch => 001-format-parameter.patch} (100%) diff --git a/pkgs/by-name/gt/gtklp/patches/autoconf.patch b/pkgs/by-name/gt/gtklp/000-autoconf.patch similarity index 100% rename from pkgs/by-name/gt/gtklp/patches/autoconf.patch rename to pkgs/by-name/gt/gtklp/000-autoconf.patch diff --git a/pkgs/by-name/gt/gtklp/patches/mdv-fix-str-fmt.patch b/pkgs/by-name/gt/gtklp/001-format-parameter.patch similarity index 100% rename from pkgs/by-name/gt/gtklp/patches/mdv-fix-str-fmt.patch rename to pkgs/by-name/gt/gtklp/001-format-parameter.patch diff --git a/pkgs/by-name/gt/gtklp/package.nix b/pkgs/by-name/gt/gtklp/package.nix index af98ed1ae1b7..c74b9f59644a 100644 --- a/pkgs/by-name/gt/gtklp/package.nix +++ b/pkgs/by-name/gt/gtklp/package.nix @@ -1,20 +1,29 @@ -{ stdenv, lib, fetchurl -, autoreconfHook, libtool, pkg-config -, gtk2, glib, cups, gettext, openssl +{ lib +, stdenv +, autoreconfHook +, cups +, fetchurl +, gettext +, glib +, gtk2 +, libtool +, openssl +, pkg-config }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "gtklp"; version = "1.3.4"; src = fetchurl { - url = "mirror://sourceforge/${pname}/${pname}-${version}.src.tar.gz"; - sha256 = "1arvnnvar22ipgnzqqq8xh0kkwyf71q2sfsf0crajpsr8a8601xy"; + url = "mirror://sourceforge/gtklp/gtklp-${finalAttrs.version}.src.tar.gz"; + hash = "sha256-vgdgkEJZX6kyA047LXA4zvM5AewIY/ztu1GIrLa1O6s="; }; nativeBuildInputs = [ - pkg-config autoreconfHook + pkg-config + cups ]; buildInputs = [ @@ -26,9 +35,13 @@ stdenv.mkDerivation rec { openssl ]; + outputs = [ "out" "doc" "man" ]; + + strictDeps = true; + patches = [ - ./patches/mdv-fix-str-fmt.patch - ./patches/autoconf.patch + ./000-autoconf.patch + ./001-format-parameter.patch ]; # Workaround build failure on -fno-common toolchains: @@ -36,22 +49,23 @@ stdenv.mkDerivation rec { # file.o:libgtklp/libgtklp.h:83: first defined here env.NIX_CFLAGS_COMPILE = "-fcommon"; - preConfigure = '' - substituteInPlace include/defaults.h --replace "netscape" "firefox" - substituteInPlace include/defaults.h --replace "http://localhost:631/sum.html#STANDARD_OPTIONS" \ - "http://localhost:631/help/" + postPatch = '' + substituteInPlace include/defaults.h \ + --replace "netscape" "firefox" \ + --replace "http://localhost:631/sum.html#STANDARD_OPTIONS" \ + "http://localhost:631/help/" ''; preInstall = '' - install -D -m0644 -t $out/share/doc AUTHORS BUGS ChangeLog README USAGE + install -D -m0644 -t $doc/share/doc AUTHORS BUGS ChangeLog README USAGE ''; - meta = with lib; { - description = "A graphical frontend for CUPS"; + meta = { homepage = "https://gtklp.sirtobi.com"; - license = licenses.gpl2Only; - maintainers = with maintainers; [ caadar ]; - platforms = platforms.unix; + description = "A GTK-based graphical frontend for CUPS"; + license = with lib.licenses; [ gpl2Only ]; + mainProgram = "gtklp"; + maintainers = with lib.maintainers; [ AndersonTorres ]; + platforms = lib.platforms.unix; }; - -} +}) From ca389f7ae12edc103d7e164115e9138e2f77c42d Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Sat, 30 Dec 2023 12:17:05 -0300 Subject: [PATCH 5/7] ssh-askpass-fullscreen: migrate to by-name --- .../ss/ssh-askpass-fullscreen/package.nix} | 0 pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 2 deletions(-) rename pkgs/{tools/networking/ssh-askpass-fullscreen/default.nix => by-name/ss/ssh-askpass-fullscreen/package.nix} (100%) diff --git a/pkgs/tools/networking/ssh-askpass-fullscreen/default.nix b/pkgs/by-name/ss/ssh-askpass-fullscreen/package.nix similarity index 100% rename from pkgs/tools/networking/ssh-askpass-fullscreen/default.nix rename to pkgs/by-name/ss/ssh-askpass-fullscreen/package.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c4337dee1a40..ab75ea86b94b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13399,8 +13399,6 @@ with pkgs; sqlboiler = callPackage ../development/tools/sqlboiler { }; - ssh-askpass-fullscreen = callPackage ../tools/networking/ssh-askpass-fullscreen { }; - sshed = callPackage ../tools/networking/sshed { }; sshguard = callPackage ../tools/security/sshguard { }; From 7d8e65b9b2f0fb1eed5f873390b6923e6ed45151 Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Sat, 30 Dec 2023 12:17:48 -0300 Subject: [PATCH 6/7] ssh-askpass-fullscreen: adopt - finalAttrs design pattern - strictDeps - remove nested with - set meta.mainProgram --- .../ss/ssh-askpass-fullscreen/package.nix | 34 ++++++++++++------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/pkgs/by-name/ss/ssh-askpass-fullscreen/package.nix b/pkgs/by-name/ss/ssh-askpass-fullscreen/package.nix index 3faff612aadc..c3b8b129d03e 100644 --- a/pkgs/by-name/ss/ssh-askpass-fullscreen/package.nix +++ b/pkgs/by-name/ss/ssh-askpass-fullscreen/package.nix @@ -1,14 +1,21 @@ -{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, gtk2, openssh }: +{ lib +, stdenv +, autoreconfHook +, fetchFromGitHub +, gtk2 +, openssh +, pkg-config +}: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "ssh-askpass-fullscreen"; version = "1.3"; src = fetchFromGitHub { owner = "atj"; - repo = pname; - rev = "v${version}"; - sha256 = "sha256-1GER+SxTpbMiYLwFCwLX/hLvzCIqutyvQc9DNJ7d1C0="; + repo = "ssh-askpass-fullscreen"; + rev = "v${finalAttrs.version}"; + hash = "sha256-1GER+SxTpbMiYLwFCwLX/hLvzCIqutyvQc9DNJ7d1C0="; }; nativeBuildInputs = [ @@ -21,12 +28,15 @@ stdenv.mkDerivation rec { openssh ]; - meta = with lib; { - broken = stdenv.isDarwin; - description = "A small SSH askpass GUI using GTK+2"; + strictDeps = true; + + meta = { homepage = "https://github.com/atj/ssh-askpass-fullscreen"; - license = licenses.gpl2; - maintainers = with maintainers; [ caadar ]; - platforms = platforms.unix; + broken = stdenv.isDarwin; + description = "A small, fullscreen SSH askpass GUI using GTK+2"; + license = with lib.licenses; [ gpl2Plus ]; + mainProgram = "ssh-askpass-fullscreen"; + maintainers = with lib.maintainers; [ AndersonTorres ]; + platforms = lib.platforms.unix; }; -} +}) From 7f9b9936881f25c67aad7cf45948928ac72fc72d Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Thu, 28 Dec 2023 22:37:54 -0300 Subject: [PATCH 7/7] maintainers: remove caadar Its personal fork of Nixpkgs is untouched since 2019-06-24. --- maintainers/maintainer-list.nix | 6 ------ 1 file changed, 6 deletions(-) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index d274e79238f1..ff1a65eb59d4 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -2836,12 +2836,6 @@ githubId = 382011; name = "c4605"; }; - caadar = { - email = "v88m@posteo.net"; - github = "caadar"; - githubId = 15320726; - name = "Car Cdr"; - }; caarlos0 = { name = "Carlos A Becker"; email = "carlos@becker.software";