Unverified Commit 453d0f8e authored by Wolfgang Walther's avatar Wolfgang Walther
Browse files

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.
parent add835b2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -15,5 +15,5 @@ date="$(date "--date=$(jq -r .commit.commit.committer.date <<< "$head_info")" +%
# 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"
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
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@
}:
mkDerivation {
  pname = "cabal2nix";
  version = "unstable-2025-08-10";
  version = "2.20.1-unstable-2025-08-10";
  src = fetchzip {
    url = "https://github.com/NixOS/cabal2nix/archive/31c6db234a905bbf4e8f34c5a986f294b231de0a.tar.gz";
    sha256 = "1ifbmcm5k8mxcpq4kscfc5ddcknawxz6a4ak30jmf0kk1lrfsikf";