Skip to content

Commit

Permalink
libpsl-with-scripts: init as override of libpsl
Browse files Browse the repository at this point in the history
psl-make-dafsa pulls in a runtime python3 dependency which seems to have
given various build configurations no end of trouble. This solves the
problem in the least subtle manner imaginable, by removing it for all
platforms and re-adding it in a new package which currently has no
dependants. Switch your dependency from libpsl to libpsl-with-scripts
if you are impacted by this.
  • Loading branch information
rhelmot committed Nov 2, 2024
1 parent 5605fc7 commit 35d05a7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
15 changes: 8 additions & 7 deletions pkgs/development/libraries/libpsl/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
python3,
buildPackages,
publicsuffix-list,
withScripts ? false,
}:

stdenv.mkDerivation rec {
Expand All @@ -31,7 +32,7 @@ stdenv.mkDerivation rec {
"dev"
]
# bin/psl-make-dafsa brings a large runtime closure through python3
++ lib.optional (!stdenv.hostPlatform.isStatic) "bin";
++ lib.optional withScripts "bin";

nativeBuildInputs = [
autoreconfHook
Expand All @@ -47,20 +48,20 @@ stdenv.mkDerivation rec {
libidn2
libunistring
libxslt
] ++ lib.optional (
!stdenv.hostPlatform.isStatic
&& !stdenv.hostPlatform.isWindows
&& (stdenv.hostPlatform.isDarwin -> stdenv.buildPlatform == stdenv.hostPlatform)
) python3;
] ++ lib.optional withScripts python3;

propagatedBuildInputs = [
publicsuffix-list
];

postPatch = lib.optionalString (!stdenv.hostPlatform.isStatic) ''
postPatch = lib.optionalString withScripts ''
patchShebangs src/psl-make-dafsa
'';

postInstall = lib.optionalString (!withScripts) ''
rm $out/bin/psl-make-dafsa $out/share/man/man1/psl-make-dafsa*
'';

preAutoreconf = ''
gtkdocize
'';
Expand Down
1 change: 1 addition & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21361,6 +21361,7 @@ with pkgs;
libpseudo = callPackage ../development/libraries/libpseudo { };

libpsl = callPackage ../development/libraries/libpsl { };
libpsl-with-scripts = libpsl.override { withScripts = true; };

libpst = callPackage ../development/libraries/libpst { };

Expand Down

0 comments on commit 35d05a7

Please sign in to comment.