Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ dist-newstyle

# APM dependencies
apm_modules/
.do-results.json
17 changes: 17 additions & 0 deletions test/simple/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@
#
# This jailbreak ignores the unsatisfiable version constraints on the library `foo`.
jailbreak = true;
# Test removeReferencesTo (cf. https://github.com/srid/haskell-flake/issues/288)
# Uses `hello` as the target. The assertion below verifies that
# disallowedReferences survives the buildFromSdist pipeline — the
# exact regression from PR #287 where overrideCabal in buildFromSdist
# would clobber the overrideAttrs from removeReferencesTo.
removeReferencesTo = [ pkgs.hello ];
};
};
devShell = {
Expand Down Expand Up @@ -101,6 +107,17 @@
TEST_RAW_ATTR =
lib.assertMsg (config.haskellProjects.default.outputs.finalPackages.foo.TEST_RAW_ATTR == "test-value")
"drvAttrs option should apply TEST_RAW_ATTR attribute";

# Test removeReferencesTo: disallowedReferences must survive buildFromSdist.
# If the PR #287 ordering regression returns, overrideCabal in buildFromSdist
# will clobber the overrideAttrs from removeReferencesTo, and this assertion
# will fail because drvAttrs won't have disallowedReferences.
REMOVE_REFS =
let
finalPkg = config.haskellProjects.default.outputs.finalPackages.haskell-flake-test;
in
lib.assertMsg (finalPkg.drvAttrs ? disallowedReferences)
"removeReferencesTo: disallowedReferences missing from final package drvAttrs";
}
''
(
Expand Down