haskellPackages.cabal2nix-unstable: set version according to contribution guidelines

The contribution guidelines require an unstable version to be leading
with a real version, or if none is available with `0-`.

This is because certain Nix operations split a package's full name into
name and version component starting with the first section starting with
a digit.

(cherry picked from commit 453d0f8eab3c0fb27968705d7f8a45328b7cc03b)

Changed files
+2 -2
maintainers
pkgs
development
haskell-modules
+1 -1
maintainers/scripts/haskell/update-cabal2nix-unstable.sh
···
# generate nix expression from cabal file, replacing the version with the commit date
output=pkgs/development/haskell-modules/cabal2nix-unstable.nix
echo '# This file defines cabal2nix-unstable, used by maintainers/scripts/haskell/regenerate-hackage-packages.sh.' > "$output"
-
cabal2nix --subpath cabal2nix "https://github.com/NixOS/cabal2nix/archive/$commit.tar.gz" | sed -e 's/version = ".*"/version = "'"unstable-$date"'"/' >> "$output"
nixfmt "$output"
···
# generate nix expression from cabal file, replacing the version with the commit date
output=pkgs/development/haskell-modules/cabal2nix-unstable.nix
echo '# This file defines cabal2nix-unstable, used by maintainers/scripts/haskell/regenerate-hackage-packages.sh.' > "$output"
+
cabal2nix --subpath cabal2nix "https://github.com/NixOS/cabal2nix/archive/$commit.tar.gz" | sed -Ee 's/version = "(.*)"/version = "\1-unstable-'"$date"'"/' >> "$output"
nixfmt "$output"
+1 -1
pkgs/development/haskell-modules/cabal2nix-unstable.nix
···
}:
mkDerivation {
pname = "cabal2nix";
-
version = "unstable-2025-09-09";
src = fetchzip {
url = "https://github.com/NixOS/cabal2nix/archive/987474e0b0ed1c6b0e3fd0d07313f6996ec98b7e.tar.gz";
sha256 = "0nixn8incqypsfyfclj40p8bdx2yn4783kzwpqfp19ql2sbc57dc";
···
}:
mkDerivation {
pname = "cabal2nix";
+
version = "2.20.1-unstable-2025-09-09";
src = fetchzip {
url = "https://github.com/NixOS/cabal2nix/archive/987474e0b0ed1c6b0e3fd0d07313f6996ec98b7e.tar.gz";
sha256 = "0nixn8incqypsfyfclj40p8bdx2yn4783kzwpqfp19ql2sbc57dc";