From 8780e5b41f89f4a9d910c6bfc35a2dc2c01bb288 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Sun, 19 Oct 2025 02:05:59 +0200 Subject: [PATCH] haskellPackages: _ prefix attribute names that would need quoting In order not to break downstream expressions that (manually) introduced dependencies on now renamed attributes, add aliases (with proper warnings about the renames) for all attributes that were previously part of Nixpkgs, but have been renamed with this change. --- .../cabal2nix-unstable/cabal2nix.nix | 4 +- .../distribution-nixpkgs.nix | 4 +- .../cabal2nix-unstable/hackage-db.nix | 4 +- .../cabal2nix-unstable/language-nix.nix | 4 +- .../haskell-modules/configuration-nix.nix | 24 +++ .../haskell-modules/hackage-packages.nix | 140 ++++++++++++++++-- 6 files changed, 160 insertions(+), 20 deletions(-) diff --git a/pkgs/development/haskell-modules/cabal2nix-unstable/cabal2nix.nix b/pkgs/development/haskell-modules/cabal2nix-unstable/cabal2nix.nix index 79a33626af3f..ebd8fa92ce90 100644 --- a/pkgs/development/haskell-modules/cabal2nix-unstable/cabal2nix.nix +++ b/pkgs/development/haskell-modules/cabal2nix-unstable/cabal2nix.nix @@ -37,8 +37,8 @@ mkDerivation { pname = "cabal2nix"; version = "2.20.1-unstable-2025-11-20"; src = fetchzip { - url = "https://github.com/NixOS/cabal2nix/archive/be62a6c198c6fd082cd5660170fa23a709d92c8e.tar.gz"; - sha256 = "15bfhl0ypnnpgglxc7smppqi3w8w04zi97gh65kk1p6drlg29f47"; + url = "https://github.com/NixOS/cabal2nix/archive/459859839cfe4fb352a29c1a72a1c4f0f537a1b8.tar.gz"; + sha256 = "1443hlbz29y2dn22kf91zx7g284zp3l2vgw6jg4wgx66v2sxrqii"; }; postUnpack = "sourceRoot+=/cabal2nix; echo source root reset to $sourceRoot"; isLibrary = true; diff --git a/pkgs/development/haskell-modules/cabal2nix-unstable/distribution-nixpkgs.nix b/pkgs/development/haskell-modules/cabal2nix-unstable/distribution-nixpkgs.nix index aab109281ebf..81a23733d424 100644 --- a/pkgs/development/haskell-modules/cabal2nix-unstable/distribution-nixpkgs.nix +++ b/pkgs/development/haskell-modules/cabal2nix-unstable/distribution-nixpkgs.nix @@ -20,8 +20,8 @@ mkDerivation { pname = "distribution-nixpkgs"; version = "1.7.1.1-unstable-2025-11-20"; src = fetchzip { - url = "https://github.com/NixOS/cabal2nix/archive/be62a6c198c6fd082cd5660170fa23a709d92c8e.tar.gz"; - sha256 = "15bfhl0ypnnpgglxc7smppqi3w8w04zi97gh65kk1p6drlg29f47"; + url = "https://github.com/NixOS/cabal2nix/archive/459859839cfe4fb352a29c1a72a1c4f0f537a1b8.tar.gz"; + sha256 = "1443hlbz29y2dn22kf91zx7g284zp3l2vgw6jg4wgx66v2sxrqii"; }; postUnpack = "sourceRoot+=/distribution-nixpkgs; echo source root reset to $sourceRoot"; enableSeparateDataOutput = true; diff --git a/pkgs/development/haskell-modules/cabal2nix-unstable/hackage-db.nix b/pkgs/development/haskell-modules/cabal2nix-unstable/hackage-db.nix index f99b95e475c4..3554407b8faa 100644 --- a/pkgs/development/haskell-modules/cabal2nix-unstable/hackage-db.nix +++ b/pkgs/development/haskell-modules/cabal2nix-unstable/hackage-db.nix @@ -19,8 +19,8 @@ mkDerivation { pname = "hackage-db"; version = "2.1.3-unstable-2025-11-20"; src = fetchzip { - url = "https://github.com/NixOS/cabal2nix/archive/be62a6c198c6fd082cd5660170fa23a709d92c8e.tar.gz"; - sha256 = "15bfhl0ypnnpgglxc7smppqi3w8w04zi97gh65kk1p6drlg29f47"; + url = "https://github.com/NixOS/cabal2nix/archive/459859839cfe4fb352a29c1a72a1c4f0f537a1b8.tar.gz"; + sha256 = "1443hlbz29y2dn22kf91zx7g284zp3l2vgw6jg4wgx66v2sxrqii"; }; postUnpack = "sourceRoot+=/hackage-db; echo source root reset to $sourceRoot"; isLibrary = true; diff --git a/pkgs/development/haskell-modules/cabal2nix-unstable/language-nix.nix b/pkgs/development/haskell-modules/cabal2nix-unstable/language-nix.nix index 2c863d4df1b7..503860f9737c 100644 --- a/pkgs/development/haskell-modules/cabal2nix-unstable/language-nix.nix +++ b/pkgs/development/haskell-modules/cabal2nix-unstable/language-nix.nix @@ -16,8 +16,8 @@ mkDerivation { pname = "language-nix"; version = "2.3.0-unstable-2025-11-20"; src = fetchzip { - url = "https://github.com/NixOS/cabal2nix/archive/be62a6c198c6fd082cd5660170fa23a709d92c8e.tar.gz"; - sha256 = "15bfhl0ypnnpgglxc7smppqi3w8w04zi97gh65kk1p6drlg29f47"; + url = "https://github.com/NixOS/cabal2nix/archive/459859839cfe4fb352a29c1a72a1c4f0f537a1b8.tar.gz"; + sha256 = "1443hlbz29y2dn22kf91zx7g284zp3l2vgw6jg4wgx66v2sxrqii"; }; postUnpack = "sourceRoot+=/language-nix; echo source root reset to $sourceRoot"; libraryHaskellDepends = [ diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index b9fde329d049..1ecbd972c5b8 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -2122,3 +2122,27 @@ builtins.intersectAttrs super { botan-bindings = super.botan-bindings.override { botan = pkgs.botan3; }; } + +// lib.optionalAttrs pkgs.config.allowAliases ( + lib.genAttrs + [ + "2captcha" + "3d-graphics-example" + "3dmodels" + "4Blocks" + "assert" + "if" + ] + ( + old: + let + new = "_" + old; + in + { + name = old; + value = + lib.warnOnInstantiate "haskell.packages.*.${old} has been renamed to haskell.packages.*.${new}" + self.${new}; + } + ) +) diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index c7bf6dd5d6b6..62de256a0597 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -8,7 +8,7 @@ self: { - "2captcha" = callPackage ( + _2captcha = callPackage ( { mkDerivation, aeson, @@ -49,7 +49,7 @@ self: { } ) { }; - "3d-graphics-examples" = callPackage ( + _3d-graphics-examples = callPackage ( { mkDerivation, base, @@ -76,7 +76,7 @@ self: { } ) { }; - "3dmodels" = callPackage ( + _3dmodels = callPackage ( { mkDerivation, attoparsec, @@ -103,7 +103,7 @@ self: { } ) { }; - "4Blocks" = callPackage ( + _4Blocks = callPackage ( { mkDerivation, base, @@ -7795,6 +7795,49 @@ self: { } ) { }; + ConcurrentUtils = callPackage ( + { + mkDerivation, + _assert, + array, + atl, + base, + containers, + extra, + list-extras, + monad-loops, + monads-tf, + parallel, + profunctors, + strict, + time, + vector, + }: + mkDerivation { + pname = "ConcurrentUtils"; + version = "0.5.0.0"; + sha256 = "1caixp7gdhjsnlr79kmc4pd4ky663x9kid9i998qrd6anbrm2i8b"; + libraryHaskellDepends = [ + _assert + array + atl + base + containers + extra + list-extras + monad-loops + monads-tf + parallel + profunctors + strict + time + vector + ]; + description = "Concurrent utilities"; + license = lib.licenses.gpl2Only; + } + ) { }; + Concurrential = callPackage ( { mkDerivation, @@ -85906,7 +85949,7 @@ self: { } ) { ghc-binary = null; }; - "assert" = callPackage ( + _assert = callPackage ( { mkDerivation, base, @@ -94713,10 +94756,8 @@ self: { ]; description = "Specify axioms for type classes and quickCheck all available instances"; license = lib.licenses.mit; - hydraPlatforms = lib.platforms.none; - broken = true; } - ) { control-invariants = null; }; + ) { }; azimuth-hs = callPackage ( { @@ -161683,6 +161724,51 @@ self: { } ) { }; + control-invariants = callPackage ( + { + mkDerivation, + _assert, + base, + containers, + data-default, + deepseq, + either, + lens, + mtl, + QuickCheck, + semigroups, + template-haskell, + th-lift, + th-printf, + transformers, + }: + mkDerivation { + pname = "control-invariants"; + version = "0.1.0.0"; + sha256 = "0qfw2g04k3jd9dqj1m46rf9dz767y3lkny8pj4zp3mnr704wnwwr"; + revision = "1"; + editedCabalFile = "0f8px9rf0d6bz0hm52iw5v89ada7jgj5lydpsr6x542hbq953wz3"; + libraryHaskellDepends = [ + _assert + base + containers + data-default + deepseq + either + lens + mtl + QuickCheck + semigroups + template-haskell + th-lift + th-printf + transformers + ]; + description = "Invariants and contract monitoring"; + license = lib.licenses.mit; + } + ) { }; + control-iso = callPackage ( { mkDerivation, @@ -224705,10 +224791,8 @@ self: { ]; description = "Existential types with lens-like accessors"; license = lib.licenses.mit; - hydraPlatforms = lib.platforms.none; - broken = true; } - ) { control-invariants = null; }; + ) { }; exists = callPackage ( { @@ -373614,7 +373698,7 @@ self: { } ) { }; - "if" = callPackage ( + _if = callPackage ( { mkDerivation, base }: mkDerivation { pname = "if"; @@ -697493,6 +697577,27 @@ self: { } ) { }; + _type = callPackage ( + { + mkDerivation, + base, + containers, + template-haskell, + }: + mkDerivation { + pname = "type"; + version = "0.2.0"; + sha256 = "13xkbj1nimgs9cm5mdqx52m1qzjgkzcxxjibqb1g8rmjgy17yj5m"; + libraryHaskellDepends = [ + base + containers + template-haskell + ]; + description = "Dynamic casting library with support for arbitrary rank type kinds"; + license = lib.licenses.bsd3; + } + ) { }; + type-aligned = callPackage ( { mkDerivation, base }: mkDerivation { @@ -732594,6 +732699,17 @@ self: { } ) { }; + _with = callPackage ( + { mkDerivation }: + mkDerivation { + pname = "with"; + version = "0.1.0"; + sha256 = "0jgm6w1xisyww81ak9rrrqmhgaiwdgk5rgvzax72rknzg9rb6701"; + description = "Simple open product type"; + license = lib.licenses.bsd3; + } + ) { }; + with-index = callPackage ( { mkDerivation, base }: mkDerivation {