Add --cabal-file-{sha256,revision} arguments#715
Add --cabal-file-{sha256,revision} arguments#7159999years wants to merge 1 commit intoNixOS:masterfrom
--cabal-file-{sha256,revision} arguments#715Conversation
This lets `cabal2nix` generate derivations with `editedCabalFile` and `revision` fields. This functionality already exists in `hackage2nix` but wasn't exposed in `cabal2nix`.
|
This functionality is exposed in
Maybe you could elaborate why these extra flags are interesting to you? I think revision are a little bit tricky. Ideally, we would just have cabal2nix do the right thing when necessary and otherwise hide this detail from the user as much as possible. (Arguably the mechanism is a layer violation to begin with which is probably why dealing with it is so annoying…) |
Ah, that might be it; I think I tested this with revision 0 of a For some more context, this is related to the " |
|
Yes, that works! Thanks for the reminder. I can close this, apologies for the ping. curl -O https://hackage.haskell.org/package/aeson-diff-1.1.0.13/revision/1.cabal
cabal2nix --sha256 8b0d0b9dd58675124d85c9285dce7028c4c9246b46ba5eaad2610269011ea169 1.cabal{ mkDerivation, aeson, base, bytestring, Cabal, cabal-doctest
, directory, doctest, edit-distance-vector, filepath, Glob, lib
, optparse-applicative, QuickCheck, scientific, text, vector, yaml
}:
mkDerivation {
pname = "aeson-diff";
version = "1.1.0.13";
sha256 = "8b0d0b9dd58675124d85c9285dce7028c4c9246b46ba5eaad2610269011ea169";
revision = "1";
editedCabalFile = "1028adallw7bm72948lj322bb5a99gfs0qc1j0pnm8hryp6n7ma5";
isLibrary = true;
isExecutable = true;
setupHaskellDepends = [ base Cabal cabal-doctest ];
libraryHaskellDepends = [
aeson base bytestring edit-distance-vector scientific text vector
];
executableHaskellDepends = [
aeson base bytestring optparse-applicative yaml
];
testHaskellDepends = [
aeson base bytestring directory doctest filepath Glob QuickCheck
vector
];
homepage = "https://github.com/ysangkok/aeson-diff";
description = "Extract and apply patches to JSON documents";
license = lib.licenses.bsd3;
} |
|
Is the |
|
Looks good: |
|
Thanks for checking, great! |
This lets
cabal2nixgenerate derivations witheditedCabalFileandrevisionfields. This functionality already exists inhackage2nixbut wasn't exposed incabal2nix.