haskellPackages.cabal2nix-unstable: rename from cabal2nix-latest

This commit is contained in:
sternenseemann 2021-05-04 13:38:29 +02:00
parent e30cf42f0c
commit 794bc5e9ed
5 changed files with 10 additions and 10 deletions

View file

@ -1,5 +1,5 @@
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p coreutils haskellPackages.cabal2nix-latest -I nixpkgs=.
#! nix-shell -i bash -p coreutils haskellPackages.cabal2nix-unstable -I nixpkgs=.
# This script is used to regenerate nixpkgs' Haskell package set, using a tool
# called hackage2nix. hackage2nix looks at
@ -9,7 +9,7 @@
# companion tool cabal2nix.
#
# Related scripts are update-hackage.sh, for updating the snapshot of the
# Hackage database used by hackage2nix, and update-cabal2nix-latest.sh,
# Hackage database used by hackage2nix, and update-cabal2nix-unstable.sh,
# for updating the version of hackage2nix used to perform this task.
set -euo pipefail

View file

@ -1,7 +1,7 @@
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p coreutils curl jq gnused haskellPackages.cabal2nix-latest -I nixpkgs=.
#! nix-shell -i bash -p coreutils curl jq gnused haskellPackages.cabal2nix-unstable -I nixpkgs=.
# Updates cabal2nix-latest to the latest master of the nixos/cabal2nix repository.
# Updates cabal2nix-unstable to the latest master of the nixos/cabal2nix repository.
# See regenerate-hackage-packages.sh for details on the purpose of this script.
set -euo pipefail
@ -13,5 +13,5 @@ commit="$(jq -r .commit.sha <<< "$head_info")"
# extract commit timestamp and convert to date
date="$(date "--date=$(jq -r .commit.commit.committer.date <<< "$head_info")" +%F)"
# generate nix expression from cabal file, replacing the version with the commit date
echo '# This file defines cabal2nix-latest, used by maintainers/scripts/haskell/regenerate-hackage-packages.sh.' > pkgs/development/haskell-modules/cabal2nix-latest.nix
cabal2nix "https://github.com/NixOS/cabal2nix/archive/$commit.tar.gz" | sed -e 's/version = ".*"/version = "'"unstable-$date"'"/' >> pkgs/development/haskell-modules/cabal2nix-latest.nix
echo '# This file defines cabal2nix-unstable, used by maintainers/scripts/haskell/regenerate-hackage-packages.sh.' > pkgs/development/haskell-modules/cabal2nix-unstable.nix
cabal2nix "https://github.com/NixOS/cabal2nix/archive/$commit.tar.gz" | sed -e 's/version = ".*"/version = "'"unstable-$date"'"/' >> pkgs/development/haskell-modules/cabal2nix-unstable.nix

View file

@ -1,4 +1,4 @@
# This file defines cabal2nix-latest, used by maintainers/scripts/haskell/regenerate-hackage-packages.sh.
# This file defines cabal2nix-unstable, used by maintainers/scripts/haskell/regenerate-hackage-packages.sh.
{ mkDerivation, aeson, ansi-wl-pprint, base, bytestring, Cabal
, containers, deepseq, directory, distribution-nixpkgs, fetchzip
, filepath, hackage-db, hopenssl, hpack, language-nix, lens, lib

View file

@ -1793,8 +1793,8 @@ self: super: {
# https://github.com/obsidiansystems/database-id/issues/1
database-id-class = doJailbreak super.database-id-class;
cabal2nix-latest = overrideCabal super.cabal2nix-latest {
passthru.updateScript = ../../../maintainers/scripts/haskell/update-cabal2nix-latest.sh;
cabal2nix-unstable = overrideCabal super.cabal2nix-unstable {
passthru.updateScript = ../../../maintainers/scripts/haskell/update-cabal2nix-unstable.sh;
};
# Too strict version bounds on base and optparse-applicative

View file

@ -13,7 +13,7 @@ self: super: {
# Used by maintainers/scripts/regenerate-hackage-packages.sh, and generated
# from the latest master instead of the current version on Hackage.
cabal2nix-latest = self.callPackage ./cabal2nix-latest.nix { };
cabal2nix-unstable = self.callPackage ./cabal2nix-unstable.nix { };
# https://github.com/channable/vaultenv/issues/1
vaultenv = self.callPackage ../tools/haskell/vaultenv { };