Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buildFromSdist: deal with breakage of removeReferencesTo #287

Merged
merged 2 commits into from
Mar 29, 2024

Conversation

srid
Copy link
Owner

@srid srid commented Mar 29, 2024

buildFromSdist is fucked up for yet another reason. It breaks removeReferencesTo:

impl = disallowedReferences: drv:
drv.overrideAttrs (old: rec {
inherit disallowedReferences;
postInstall = (old.postInstall or "") + ''
${lib.concatStrings (map (e: "echo Removing reference to: ${e}\n") disallowedReferences)}
${lib.concatStrings (map (e: "remove-references-to -t ${e} $out/bin/*\n") disallowedReferences)}
'';
});

The solution here is to apply removeReferencesTo after buildFromSdist.

Incidentally, `buildFromSdist` hasn't been changed since 2018:

NixOS/nixpkgs#48699
@srid srid force-pushed the buildFromSdist-removeReferencesTo branch from 295c1d3 to 01fb3da Compare March 29, 2024 16:22
Also add a warning about potential issues.

The function hasn't been updated upstream since 2018

- NixOS/nixpkgs#48699
@srid srid merged commit 785956b into master Mar 29, 2024
17 checks passed
@srid srid deleted the buildFromSdist-removeReferencesTo branch March 29, 2024 16:26
srid added a commit to srid/emanote that referenced this pull request Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant