Skip to content

Commit e89ec9a

Browse files
Merge pull request #683 from NixOS/no-resolve-nix-tools
FromCabal.Name: stop resolving executables from pkgs.nix to nix attr
2 parents 8da8580 + 8cc8822 commit e89ec9a

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

cabal2nix/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616
and `pkgs.devil` all of which have been removed from Nixpkgs for 25.11.
1717
* Removed expression post processing hooks for `pandoc`, `pandoc-citeproc`,
1818
`liquid-fixpoint` and `GlomeVec`.
19+
* Stop resolving the `nix-store`, `nix-hash` etc. executables in `build-tools`
20+
to a `nix` package input. As of 2025-10-16, this clashes with a Hackage
21+
package causing the input to stop working as intended. Users who relied
22+
on this resolution, will need to pass in `pkgs.nix` manually via overrides
23+
going forward.
1924

2025
## 2.20.1
2126

cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal/Name.hs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -324,11 +324,6 @@ buildToolNixName "gtk2hsC2hs" = return "gtk2hs-buildtools"
324324
buildToolNixName "gtk2hsHookGenerator" = return "gtk2hs-buildtools"
325325
buildToolNixName "gtk2hsTypeGen" = return "gtk2hs-buildtools"
326326
buildToolNixName "hsc2hs" = []
327-
buildToolNixName "nix-build" = return "nix"
328-
buildToolNixName "nix-env" = return "nix"
329-
buildToolNixName "nix-hash" = return "nix"
330-
buildToolNixName "nix-instantiate" = return "nix"
331-
buildToolNixName "nix-store" = return "nix"
332327
buildToolNixName "utillinux" = return "util-linux"
333328
buildToolNixName x = return (fromString x)
334329

cabal2nix/test/golden-test-cases/nix-paths.nix.golden

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
{ mkDerivation, base, lib, nix, process }:
1+
{ mkDerivation, base, lib, nix-build, nix-env, nix-hash
2+
, nix-instantiate, nix-store, process
3+
}:
24
mkDerivation {
35
pname = "nix-paths";
46
version = "1.0.1";
57
sha256 = "deadbeef";
68
libraryHaskellDepends = [ base process ];
7-
libraryToolDepends = [ nix ];
9+
libraryToolDepends = [
10+
nix-build nix-env nix-hash nix-instantiate nix-store
11+
];
812
homepage = "https://github.com/peti/nix-paths";
913
description = "Knowledge of Nix's installation directories";
1014
license = lib.licenses.bsd3;

0 commit comments

Comments
 (0)