This repository has been archived by the owner on Dec 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
try supporting local tarballs #6
Open
ParetoOptimalDev
wants to merge
4
commits into
mlabs-haskell:main
Choose a base branch
from
ParetoOptimalDev:support-local-tarballs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
try supporting local tarballs #6
ParetoOptimalDev
wants to merge
4
commits into
mlabs-haskell:main
from
ParetoOptimalDev:support-local-tarballs
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fails with: ``` $ nix build --show-trace warning: Git tree '/home/cody/org-roam/data/8b/42ad14-944b-4c40-b083-3de8b2db86e8/haskell-nix-extra-hackage' is dirty trace: haskell-project-plan-to-nix-pkgs: To make project.plan-nix for haskell-project a fixed-output derivation but not materialized, set `plan-sha256` to the output of the 'calculateMaterializedSha' script in 'passthru'. trace: haskell-project-plan-to-nix-pkgs: To materialize project.plan-nix for haskell-project entirely, pass a writable path as the `materialized` argument and run the 'updateMaterialized' script in 'passthru'. trace: untarring file: /nix/store/1fzb3r9cifq4vnqiscq5syn1ms5k5g7h-amazonka-1.6.1.tar.gz error: builder for '/nix/store/vz0dzg2vg7lpq9qhc7kc2if5zgycbsj3-dot-cabal-_amazonka--hackage.haskell.org-at-2022-05-04T000000Z.drv' failed with exit code 1; last 1 log lines: > open: does not exist (No such file or directory) For full logs, run 'nix log /nix/store/vz0dzg2vg7lpq9qhc7kc2if5zgycbsj3-dot-cabal-_amazonka--hackage.haskell.org-at-2022-05-04T000000Z.drv'. error: 1 dependencies of derivation '/nix/store/gb3lqf26bkgvysm3m375zr01wb7azm9x-dot-cabal-_amazonka--hackage.haskell.org-at-2022-05-04T000000Z.drv' failed to build error: 1 dependencies of derivation '/nix/store/9sk1c16yrz98vy5kl7lcwq7d5kgqpacj-haskell-project-plan-to-nix-pkgs.drv' failed to build … while realising the context of path '/nix/store/lxyaigcc85cpvqzm1qi9d5qnl34a0w8k-haskell-project-plan-to-nix-pkgs' at /nix/store/5c3r0m8x3z9d1lfw3lh8nx1lbvvna03b-source/lib/import-and-filter-project.nix:18:13: 17| projectSubDir'' = if projectSubDir == "" then "" else projectSubDir + "/"; # With trailing / 18| project = import "${projectNix}${projectSubDir'}"; | ^ 19| in project // { … while evaluating anonymous lambda at /nix/store/5c3r0m8x3z9d1lfw3lh8nx1lbvvna03b-source/lib/import-and-filter-project.nix:5:1: 4| { pkgs, haskellLib }: 5| { projectNix, sourceRepos, src }: | ^ 6| let … from call site at /nix/store/5c3r0m8x3z9d1lfw3lh8nx1lbvvna03b-source/overlays/haskell.nix:513:27: 512| callProjectResults = callCabalProjectToNix args; 513| plan-pkgs = importAndFilterProject { | ^ 514| inherit (callProjectResults) projectNix sourceRepos src; … while evaluating the attribute 'hsPkgs' at /nix/store/5c3r0m8x3z9d1lfw3lh8nx1lbvvna03b-source/overlays/haskell.nix:539:43: 538| project = addProjectAndPackageAttrs rec { 539| inherit (pkg-set.config) hsPkgs; | ^ 540| inherit pkg-set; … while evaluating the attribute 'hsPkgs' at /nix/store/5c3r0m8x3z9d1lfw3lh8nx1lbvvna03b-source/overlays/haskell.nix:569:15: 568| # Haskell packages 569| hsPkgs = final.lib.mapAttrs (packageName: package': | ^ 570| if package' == null … while evaluating 'filterAttrs' at /nix/store/l4ysisamwr0jdf6w2za4zygj9ajlf0wb-source/lib/attrsets.nix:224:23: 223| */ 224| filterAttrs = pred: set: | ^ 225| listToAttrs (concatMap (name: let v = set.${name}; in if pred name v then [(nameValuePair name v)] else []) (attrNames set)); … from call site at /nix/store/5c3r0m8x3z9d1lfw3lh8nx1lbvvna03b-source/lib/default.nix:108:31: 107| isProjectPackage = p: p.isProject or false; 108| selectProjectPackages = ps: lib.filterAttrs (n: p: p != null && isLocalPackage p && isProjectPackage p) ps; | ^ 109| … while evaluating 'selectProjectPackages' at /nix/store/5c3r0m8x3z9d1lfw3lh8nx1lbvvna03b-source/lib/default.nix:108:27: 107| isProjectPackage = p: p.isProject or false; 108| selectProjectPackages = ps: lib.filterAttrs (n: p: p != null && isLocalPackage p && isProjectPackage p) ps; | ^ 109| … from call site at /nix/store/5c3r0m8x3z9d1lfw3lh8nx1lbvvna03b-source/overlays/haskell.nix:741:63: 740| }: 741| let packageNames = project: builtins.attrNames (packages project.hsPkgs); | ^ 742| packagesForProject = prefix: project: … while evaluating 'packageNames' at /nix/store/5c3r0m8x3z9d1lfw3lh8nx1lbvvna03b-source/overlays/haskell.nix:741:34: 740| }: 741| let packageNames = project: builtins.attrNames (packages project.hsPkgs); | ^ 742| packagesForProject = prefix: project: … from call site at /nix/store/5c3r0m8x3z9d1lfw3lh8nx1lbvvna03b-source/overlays/haskell.nix:759:24: 758| (package.components.benchmarks) 759| ) (packageNames project); | ^ 760| checksForProject = prefix: project: … while evaluating 'packagesForProject' at /nix/store/5c3r0m8x3z9d1lfw3lh8nx1lbvvna03b-source/overlays/haskell.nix:742:48: 741| let packageNames = project: builtins.attrNames (packages project.hsPkgs); 742| packagesForProject = prefix: project: | ^ 743| final.lib.concatMap (packageName: … from call site at /nix/store/5c3r0m8x3z9d1lfw3lh8nx1lbvvna03b-source/overlays/haskell.nix:778:21: 777| attrsForAllProjects = f: builtins.listToAttrs ( 778| f "" project | ^ 779| ++ final.lib.concatMap (project: … while evaluating 'attrsForAllProjects' at /nix/store/5c3r0m8x3z9d1lfw3lh8nx1lbvvna03b-source/overlays/haskell.nix:777:39: 776| ) (packageNames project); 777| attrsForAllProjects = f: builtins.listToAttrs ( | ^ 778| f "" project … from call site at /nix/store/5c3r0m8x3z9d1lfw3lh8nx1lbvvna03b-source/overlays/haskell.nix:789:28: 788| # `nix build .#pkg-name:test:test-name` 789| packages = attrsForAllProjects packagesForProject; | ^ 790| # Used by: … while evaluating the attribute 'packages."myapp:exe:myapp"' at /nix/store/5c3r0m8x3z9d1lfw3lh8nx1lbvvna03b-source/overlays/haskell.nix:789:17: 788| # `nix build .#pkg-name:test:test-name` 789| packages = attrsForAllProjects packagesForProject; | ^ 790| # Used by: ```
This was broken because that package had Now it seems to be working. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I came across input-output-hk/haskell.nix#1550 today and it said
haskell-nix-extra-hackage
supports being able to add local tarballs somehow?I tried that from main with this modification:
And got:
Browsing through the code, I see this package assumes the library is in a directory, not already a tarball.
This PR: