haskell: default name to "" when root isn't a path in developPackage#103063
haskell: default name to "" when root isn't a path in developPackage#103063maralorn merged 1 commit intoNixOS:haskell-updatesfrom
Conversation
There was a problem hiding this comment.
When would you want this? root gets passed to callCabal2nix, so it looks like it has to be a path?
What bug are you trying to fix here?
There was a problem hiding this comment.
Ah, email response doesn't work for review comments. My response is below
|
This allows one to set root to store paths, for instance the output of
gitignoreSource.
…On Sat, Nov 7, 2020, 7:24 PM Dennis Gosnell ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In pkgs/development/haskell-modules/make-package-set.nix
<#103063 (comment)>:
> @@ -230,7 +230,7 @@ in package-set { inherit pkgs stdenv callPackage; } self // {
# build that package.
developPackage =
{ root
- , name ? builtins.baseNameOf root
+ , name ? if builtins.typeOf root == "path" then builtins.baseNameOf root else ""
When would you want this? root gets passed to callCabal2nix, so it looks
like it has to be a path?
What bug are you trying to fix here?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#103063 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGRJXABMHX7KQCYKMBUOJDSOUU5PANCNFSM4TNQP45A>
.
|
|
Is there a nice way to get the name of a store path (i.e. everything after the hash), perhaps that would be better than |
ab1e60c to
9ea5a41
Compare
f9f2502 to
4516138
Compare
|
rebased |
0cf6d0c to
c55cdb4
Compare
|
Is it possible to merge or reject this please? |
e6cf312 to
2fc326d
Compare
|
rebased |
2c7ad11 to
0e5f7e8
Compare
7b89288 to
d8d2e94
Compare
ba32886 to
c9e5a3f
Compare
4c606a9 to
3ae580b
Compare
56fa6fc to
f3cb253
Compare
|
Maralorn, you are such a tease.
…On Sat, 8 May 2021, 6:23 am maralorn, ***@***.***> wrote:
Reopened #103063 <#103063>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#103063 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGRJXBDS4U73ZVCQXONVODTMRR5RANCNFSM4TNQP45A>
.
|
|
I am sorry. I just a had blip where a browser plugin accidentally removed the haskell-updates branch. I haven‘t looked into the content of this PR but I will, if you are still on it. |
|
I've rebased, would be good to have this in or out one way or the other :) |
|
Yeah, so I have looked into this. And I am certainly not opposed. But I have to say I really like the idea of getting some kind of identifier from the store path. I will look into that. |
|
Hm, we can handcraft that, but that would be no tiny amount of code and there is no convenience function that I can find. |
|
Thanks! |
|
The more cosmetic solution to this would be using something like this: https://cs.tvl.fyi/depot/-/blob/nix/utils/default.nix#L20-59. Depending on how relevant the |
Thanks, to you! |
See #103062
I don't think the documentation on developPackage really needs updating, at the risk of making it too verbose.
Motivation for this change
This allows derivation outputs to be used as the
rootattribute indevelopPackageThings done
sandboxinnix.confon non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"./result/bin/)nix path-info -Sbefore and after)