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

todosrht: 0.61.11 -> 0.62.1 #100248

Merged
merged 1 commit into from Oct 12, 2020
Merged

Conversation

RaitoBezarius
Copy link
Member

@RaitoBezarius RaitoBezarius commented Oct 11, 2020

Motivation for this change

Package bumping.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@doronbehar
Copy link
Contributor

You should consider writing a script to update all of these packages, See https://nixos.org/manual/nixpkgs/unstable/#var-passthru-updateScript and: ryantm/nixpkgs-update#205 .

@RaitoBezarius
Copy link
Member Author

You should consider writing a script to update all of these packages, See https://nixos.org/manual/nixpkgs/unstable/#var-passthru-updateScript and: ryantm/nixpkgs-update#205 .

There is already an update script, AFAIK.

@doronbehar
Copy link
Contributor

Then it could be easier to review it all went into 1 PR :). And there is no update script:

grep updateScript -R pkgs/applications/version-management/sourcehut/

@eadwu
Copy link
Member

eadwu commented Oct 11, 2020

There is one, it just isn't used in updateScript. I forgot the reason why I didn't add the attribute, probably didn't know that was being used when I first included the PR or didn't know how it worked.

Though as I was writing one reason was probably because using the update.sh won't work by default, because it does all derivations by default, not one by one.

Ah, another reason was because buildGoModule was a fixed output derivation, which I didn't include into the update script by default, which would cause problems if not changed sometimes.

Copy link
Member

@eadwu eadwu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

git fetch upstream master
git reset --hard upstream/master # 8294af02845210169290240e6fd356f6b7ea3f11
for branch in raito-srht-todo raito-srht-git raito-srht-paste raito-srht-meta raito-srht-man raito-srht-lists raito-srht-hub raito-srht-hg raito-srht-builds; do
  git pull --no-edit https://github.com/RaitoBezarius/nixpkgs $branch
done
nix-build -A sourcehut --no-out-link

/nix/store/ksgrcv6iqmp873jbgp1mdxma6xy9sl90-python3.8-buildsrht-0.63.4
/nix/store/xq1y5b53c957fcb7gwgpm5474fiz7pjc-python3.8-dispatchsrht-0.14.9
/nix/store/x6qrvwf200vbbc9k5kyc2cjmls9igmld-python3.8-gitsrht-0.61.10
/nix/store/xy6h4s1gk9v9gssg5y3yimny1ikzcm5z-python3.8-hgsrht-0.26.19
/nix/store/wwbhbh0y6bm7dchvwk6mq5lycn7b13wp-python3.8-hubsrht-0.11.5
/nix/store/d2zjhn7l6karlcfk13j19cxpwqk55g8g-python3.8-listssrht-0.45.15
/nix/store/gr0fsjc6wi8fjpnrflw0wql8v0xygpkp-python3.8-mansrht-0.15.4
/nix/store/lkr4y0wgxlyibyxlqqm6s3piabcqy5a0-python3.8-metasrht-0.51.2
/nix/store/kh72h6wid0bhhgkrg4xk4dxnispi1b25-python3.8-pastesrht-0.11.2
/nix/store/z65l1jqvxa58zzwwa3bvglb6asj4y8cv-python3-3.8.5
/nix/store/c2s1jnry70anmswvjfb2cf72019f31rb-python3.8-todosrht-0.62.1

@RaitoBezarius
Copy link
Member Author

Then it could be easier to review it all went into 1 PR :). And there is no update script:

grep updateScript -R pkgs/applications/version-management/sourcehut/

Well, I asked if I could bundle all those in one PR and didn't get any answer on IRC, so in doubt, I splitted them :D…
+1 at what @eadwu says regarding buildGoModule and required manual intervention to capture the hashes.

@doronbehar doronbehar merged commit 38c6398 into NixOS:master Oct 12, 2020
@doronbehar
Copy link
Contributor

+1 at what @eadwu says regarding buildGoModule and required manual intervention to capture the hashes.

Here's an ugly way to get vendorSha256 in a script:

set +e
vendorSha256="$(nix-build -A gotify-server 2>&1 | grep "got:" | cut -d':' -f3)"
set -e
printf '"%s"\n' "$vendorSha256" > $dirname/vendor-sha.nix
tput setaf 2
echo got vendorSha256 of: $vendorSha256
tput sgr0

Though I know it's possible to use nix-prefetch --expr somehow..

Ah, another reason was because buildGoModule was a fixed output derivation, which I didn't include into the update script by default, which would cause problems if not changed sometimes.

buildGoModule will stay a fixed output derivation for a long time to my estimate, it shouldn't block your convenience.

@eadwu
Copy link
Member

eadwu commented Oct 12, 2020

The problem is when the old derivation isn't gc'ed, where the hash error doesn't occur.

@doronbehar
Copy link
Contributor

Take a look at the whole script, it puts zeros on all of it before running that command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants