-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
gup: 0.5.5 -> 0.6.0 and extract src into JSON #21516
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| #!/bin/bash | ||
| set -eu | ||
| if [ -n "${GUP_TARGET:-}" ]; then | ||
| gup --always | ||
| fi | ||
| curl -LSs -o "$1" https://raw.githubusercontent.com/timbertson/gup/master/nix/gup-python.nix | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,21 @@ | ||
| { stdenv, fetchFromGitHub, lib, python, which }: | ||
| let | ||
| version = "0.5.5"; | ||
| src = fetchFromGitHub { | ||
| sha256 = "12yv0j333z6jkaaal8my3jx3k4ml9hq8ldis5zfvr8179d4xah7q"; | ||
| rev = "version-${version}"; | ||
| repo = "gup"; | ||
| owner = "timbertson"; | ||
| }; | ||
| in | ||
| { stdenv, fetchFromGitHub, lib, pythonPackages, nix-update-source, curl }: | ||
| import ./build.nix | ||
| { inherit stdenv lib python which; } | ||
| { inherit src version; | ||
| { inherit stdenv lib pythonPackages; } | ||
| { inherit (nix-update-source.fetch ./src.json) src version; | ||
| meta = { | ||
| inherit (src.meta) homepage; | ||
| homepage = https://github.com/timbertson/gup/; | ||
| description = "A better make, inspired by djb's redo"; | ||
| license = stdenv.lib.licenses.lgpl2Plus; | ||
| maintainers = [ stdenv.lib.maintainers.timbertson ]; | ||
| platforms = stdenv.lib.platforms.all; | ||
| }; | ||
| passthru = { | ||
| updateScript = '' | ||
| set -e | ||
| echo | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any reason for that?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| cd ${toString ./.} | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, this does work? nice…
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was pretty surprised, but yes!
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (well, as long as you're building it from a checkout |
||
| ${nix-update-source}/bin/nix-update-source --prompt version src.json | ||
| ./build.nix.gup build.nix | ||
| ''; | ||
| }; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| { | ||
| "fetch": { | ||
| "args": { | ||
| "owner": "timbertson", | ||
| "repo": "gup", | ||
| "rev": "version-0.6.0", | ||
| "sha256": "053xnx39jh9kn9l572z4k0q7bbxjpisf1fm9aq27ybj2ha1rh6wr" | ||
| }, | ||
| "fn": "fetchFromGitHub", | ||
| "rev": "version-0.6.0", | ||
| "version": "0.6.0" | ||
| }, | ||
| "owner": "timbertson", | ||
| "repo": "gup", | ||
| "rev": "version-{version}", | ||
| "type": "fetchFromGitHub" | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So you combine
masterversion ofbuild.nixwith latest-release source version? Isn't that going to break?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could possibly do something more complex to get the branch that's just been updated, but practically speaking I'll always be updating to the latest release. If I ever need to update to an old release for some reason, I'd have to fix this up (although the .nix file doesn't change that much between versions anyway, so it still might not matter)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, if you commit to always prevent «
mastercontainsbuild.nixfor the future release, not for the current» as the maintainer on both sides, then I guess that's acceptable.