Merge pull request #327 from nix-community/haskell

Haskell: enable jailbreak by default
This commit is contained in:
DavHau 2022-10-14 00:35:52 +02:00 committed by GitHub
commit 25dd408062
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 35 additions and 4 deletions

View File

@ -89,5 +89,9 @@ jobs:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
max-jobs = 10
- uses: cachix/cachix-action@v10
with:
name: nix-community
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- run: nix run .#format -- --fail-on-change

View File

@ -140,11 +140,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1657638268,
"narHash": "sha256-blBNtQSslAFkg0Gym9fWNJk+bPxGSZib4SOcPrmTPi4=",
"lastModified": 1665580254,
"narHash": "sha256-hO61XPkp1Hphl4HGNzj1VvDH5URt7LI6LaY/385Eul4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d80993b5f885515254746ba6d1917276ee386149",
"rev": "f634d427b0224a5f531ea5aa10c3960ba6ec5f0f",
"type": "github"
},
"original": {

View File

@ -123,6 +123,9 @@ in {
src = getSource name version;
# ignore if dependencies contain multiple versions of the same package
jailbreak = true;
isLibrary = true;
isExecutable = true;
doCheck = false;

View File

@ -17,7 +17,31 @@ in rec {
'';
# The cabal2json program
cabal2json = pkgs.haskell.packages.ghc8107.cabal2json;
cabal2json = let
haskellLib = pkgs.haskell.lib.compose;
haskellPackages = pkgs.haskell.packages.ghc8107.override {
overrides = _: prev: {
autodocodec = l.pipe prev.autodocodec [
haskellLib.markUnbroken
haskellLib.dontCheck
];
validity-aeson = l.pipe prev.validity-aeson [
haskellLib.dontCheck
haskellLib.markUnbroken
];
validity =
haskellLib.overrideCabal (_: {
patches = [];
})
(haskellLib.dontCheck prev.validity);
};
};
cabal2json' = haskellPackages.cabal2json.override {
Cabal = haskellLib.dontCheck haskellPackages.Cabal_3_2_1_0;
};
cabal2json = haskellLib.dontCheck cabal2json';
in
cabal2json;
# parse cabal file via IFD
fromCabal = file: name: let