-
-
Notifications
You must be signed in to change notification settings - Fork 15.4k
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
nix-prefetch: 0.3.0 -> 0.3.1 #85367
nix-prefetch: 0.3.0 -> 0.3.1 #85367
Conversation
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.
Thank you for making the PR! I planned to make a PR for 4.0, but it's development is on hold for the moment due to lack of time. The only request I have is whether you could add/change:
{
src = fetchFromGitHub {
owner = "msteen";
repo = "nix-prefetch";
rev = version;
sha256 = "1bjgs52x03wydh51zl4kn6j52qwhkqy3z6wl7mvq0g31lsg9gdx4";
extraPostFetch = ''
echo "SOURCE_DATE_EPOCH=$(stat -c %Y $out)" > $out/.env
'';
};
configurePhase = ''
set -a
. .env
set +a
'';
}
Such that the date is actually incorporated properly in the manpage rather than having 01/01/1970. Please correct me if it can be done better.
license = licenses.mit; | ||
maintainers = with maintainers; [ msteen ]; | ||
platforms = platforms.all; |
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.
Is this removed because it is the default? Just so I know for future reference.
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.
Yes
{ stdenv, lib, fetchFromGitHub, makeWrapper, asciidoc, docbook_xml_dtd_45, git | ||
, docbook_xsl, libxml2, libxslt, coreutils, gawk, gnugrep, gnused, jq, nix | ||
, installShellFiles }: |
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 generally prefer to separate the Nix specific things needed to package the software and the rest. For example:
{ stdenv, fetchFromGitHub, installShellFiles, makeWrapper,
... the rest sorted by alphabet and split to prevent too long lines ...
However, this is styling related and could be considered personal taste, so I do not consider this a blocker of any kind, can be kept as is and that is fine as well, just not my preference.
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 have nixpkgs-fmt
in a save-hook so all formatting is due to that.
|
||
stdenv.mkDerivation rec { | ||
let binPath = lib.makeBinPath [ coreutils gawk git gnugrep gnused jq nix ]; |
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.
Why not just use stdenv.lib
? If you really prefer lib
, I am fine with that, but then be consistent, i.e. also use meta = with lib; {
.
Storing just the timestamp, we don't have to do the |
|
||
buildPhase = '' | ||
a2x -f manpage doc/nix-prefetch.1.asciidoc | ||
a2x -a revdate=$(date --date=@$(cat $src/.timestamp) +%d/%m/%Y) \ |
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.
Not sure if Nix already does this for us, but do we need to add --utc
to make it more pure?
I'll squash this on merge. |
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 do not see any problems with it anymore, only nice improvements, and I learned some new stuff with this PR, so great job!
Dependencies updates. ## Changelog for nixpkgs: Commits: [NixOS/nixpkgs@7c21abdf...10100a97](NixOS/nixpkgs@7c21abd...10100a9) * [`f073b74c`](NixOS/nixpkgs@f073b74) nixos/captive-browser: set chromium's data-dir to a XDG-compliant location * [`a35282f8`](NixOS/nixpkgs@a35282f) ivan: add full iconset * [`321bc323`](NixOS/nixpkgs@321bc32) krita: disable parallel building NixOS/nixpkgs#35359 * [`05cc2b1f`](NixOS/nixpkgs@05cc2b1) unifiStable: 5.12.35 -> 5.12.66 * [`4be26439`](NixOS/nixpkgs@4be2643) kubernetes: 1.17.3 -> 1.18.0 * [`d01c1f35`](NixOS/nixpkgs@d01c1f3) obs-v4l2sink: init at unstable-20181012 * [`40998c81`](NixOS/nixpkgs@40998c8) platformio: 4.1.0 -> 4.3.1 * [`a9e3ec1d`](NixOS/nixpkgs@a9e3ec1) nixos/systemd-nspawn: disallow multiple packages with `.nspawn`-units * [`511cb624`](NixOS/nixpkgs@511cb62) node-problem-detector: init at 0.8.1 * [`f5afc20d`](NixOS/nixpkgs@f5afc20) R: Update CRAN and bioconductor packages * [`8a37c3dd`](NixOS/nixpkgs@8a37c3d) nixos/initrd-ssh: fix typo in docs * [`91c68099`](NixOS/nixpkgs@91c6809) nixos/stage-1: check secret paths before copying * [`a94fedc2`](NixOS/nixpkgs@a94fedc) victoriametrics: 1.34.5 -> 1.34.7 * [`e443f9f1`](NixOS/nixpkgs@e443f9f) offlineimap: 7.3.2 -> 7.3.3 * [`b1c14fb6`](NixOS/nixpkgs@b1c14fb) advancecomp: version number correctly embedded in binaries * [`ec6bac99`](NixOS/nixpkgs@ec6bac9) nixos/build-vms: propagate file location * [`c26ee286`](NixOS/nixpkgs@c26ee28) python.pkgs.zimports: init at 0.2.0 * [`84108981`](NixOS/nixpkgs@8410898) development/compilers/zig: upgrade to 0.6.0 * [`f94bd953`](NixOS/nixpkgs@f94bd95) Update pkgs/development/compilers/zig/default.nix * [`24b3158e`](NixOS/nixpkgs@24b3158) zig: apply suggestion from @cole-h * [`8f59b98f`](NixOS/nixpkgs@8f59b98) blugon: 1.12.0 -> 1.12.1 * [`da9feeb4`](NixOS/nixpkgs@da9feeb) gtk-mac-integration: 2.0.8 -> 2.1.3 * [`cca2fe91`](NixOS/nixpkgs@cca2fe9) sequeler: 0.7.4 -> 0.7.9 * [`4e60f304`](NixOS/nixpkgs@4e60f30) humanity-icon-theme: init at 0.6.15 * [`4a129e6a`](NixOS/nixpkgs@4a129e6) vscode: 1.44.0 -> 1.44.1 * [`28ef4382`](NixOS/nixpkgs@28ef438) nixosTests.flannel: port to python, unbreak * [`ff820a10`](NixOS/nixpkgs@ff820a1) notejot: 1.6.0 -> 1.6.3 * [`913520ad`](NixOS/nixpkgs@913520a) otfcc: 0.9.6 -> 0.10.4 * [`cdc38990`](NixOS/nixpkgs@cdc3899) pgmetrics: 1.8.1 -> 1.9.0 * [`29fad518`](NixOS/nixpkgs@29fad51) pidgin-carbons: 0.1.3 -> 0.2.2 * [`4848eef2`](NixOS/nixpkgs@4848eef) git: Allow the update script to target non-latest versions * [`d6d2b1ee`](NixOS/nixpkgs@d6d2b1e) rdma-core: 28.0 -> 29.0 * [`33da4f71`](NixOS/nixpkgs@33da4f7) smarty3: 3.1.34 -> 3.1.35 * [`1844d4ad`](NixOS/nixpkgs@1844d4a) system-syzygy: Fix invalid desktopFile arguments * [`81a38b04`](NixOS/nixpkgs@81a38b0) zafiro-icons: 1.0 -> 1.1 * [`b8a83a2f`](NixOS/nixpkgs@b8a83a2) acpica-tools: 20200110 -> 20200326 * [`0a37de95`](NixOS/nixpkgs@0a37de9) atlassian-cli: 9.1.1 -> 9.2.0 * [`cf1c9247`](NixOS/nixpkgs@cf1c924) bibclean: 3.03 -> 3.04 * [`90bc1492`](NixOS/nixpkgs@90bc149) ocamlPackages.asn1-combinators: 0.2.0 -> 0.2.2 * [`2dff34b5`](NixOS/nixpkgs@2dff34b) xfce: add pos attribute in mkXfcederivation * [`a772bc6e`](NixOS/nixpkgs@a772bc6) xfce.orage: the git repository has been archived (unmaintained) * [`827a6619`](NixOS/nixpkgs@827a661) common-updater-scripts: add scripts to help update packages * [`8162d76b`](NixOS/nixpkgs@8162d76) xfce: tailor general update scripts to the xfce packages * [`06ba3121`](NixOS/nixpkgs@06ba312) xfce: add update scripts to xfce packages * [`a097de3e`](NixOS/nixpkgs@a097de3) common-updater-scripts: ignore update-git-commits.txt * [`29a98f2b`](NixOS/nixpkgs@29a98f2) ocamlPackages.ounit2: init at 2.2.2 * [`f6a53ee7`](NixOS/nixpkgs@f6a53ee) zoom-us: 3.5.383291.0407 -> 3.5.385850.0413 * [`8930a67d`](NixOS/nixpkgs@8930a67) line-awesome: init at 1.3.0 * [`dd3cc04a`](NixOS/nixpkgs@dd3cc04) chromedriver: 80.0.3987.16 -> 81.0.4044.69 * [`a7f013e7`](NixOS/nixpkgs@a7f013e) bitlbee-discord: 0.4.2 -> 0.4.3 * [`7cfd7367`](NixOS/nixpkgs@7cfd736) python27Packages.autopep8: 1.5 -> 1.5.1 * [`18771825`](NixOS/nixpkgs@1877182) higan: 106 -> 110 * [`ccd68926`](NixOS/nixpkgs@ccd6892) linode-cli: remove deprecated perl version, init python version at 2.14.1 * [`a3cd9c97`](NixOS/nixpkgs@a3cd9c9) ocamlPackages.fmt: 0.8.6 -> 0.8.8 * [`c446ce30`](NixOS/nixpkgs@c446ce3) chirp: 20200213 -> 20200409 * [`8e00de93`](NixOS/nixpkgs@8e00de9) cfdg: 3.2_2 -> 3.3 * [`e16c7dae`](NixOS/nixpkgs@e16c7da) [Don’t merge] Recurse into OCaml packages * [`759cac42`](NixOS/nixpkgs@759cac4) ocamlPackages.notty: 0.2.1 → 0.2.2 * [`238bd2a8`](NixOS/nixpkgs@238bd2a) Revert "[Don’t merge] Recurse into OCaml packages" * [`8f4bb21a`](NixOS/nixpkgs@8f4bb21) wpsoffice: apply nixpkgs-fmt, sort alphabetically * [`f6e28348`](NixOS/nixpkgs@f6e2834) wpsoffice: 11.1.0.9080 -> 11.1.0.9505 * [`593fd37c`](NixOS/nixpkgs@593fd37) wpsoffice: switch to autoPatchelfHook, update dependencies * [`6daab9b9`](NixOS/nixpkgs@6daab9b) wpsoffice: apply Qt and GTK wrappers * [`0e5aefce`](NixOS/nixpkgs@0e5aefc) wpsoffice: remove outdated substituteInPlace * [`a2d16c4d`](NixOS/nixpkgs@a2d16c4) wpsoffice: drop i686-linux from platforms * [`7cc1c2c6`](NixOS/nixpkgs@7cc1c2c) wpsoffice: remove specific output names * [`f57da8ef`](NixOS/nixpkgs@f57da8e) tig: fix tig-completion's dependency on __git_complete * [`e3553f1d`](NixOS/nixpkgs@e3553f1) iftop: add `passthru.tests` to reference VM-test * [`37fe88e2`](NixOS/nixpkgs@37fe88e) grocy: add `passthru.tests` to reference VM-test * [`b7c3c3f5`](NixOS/nixpkgs@b7c3c3f) cargo-make: 0.30.4 -> 0.30.5 * [`2da253a7`](NixOS/nixpkgs@2da253a) documize-community: add `passthru.tests` to reference VM-test * [`10c03528`](NixOS/nixpkgs@10c0352) ping: use vala_0_40 * [`433ea74a`](NixOS/nixpkgs@433ea74) nasc: fix build * [`05be03fb`](NixOS/nixpkgs@05be03f) podman: 1.8.2 -> 1.9.0 * [`6f6c08af`](NixOS/nixpkgs@6f6c08a) hydra-unstable: 2020-04-07 -> 2020-04-16 * [`ef80b632`](NixOS/nixpkgs@ef80b63) hydra*: add `passthru.tests` to reference VM-tests * [`dd14ee84`](NixOS/nixpkgs@dd14ee8) g2o: fix log limit exceeded error in Hydra * [`9693911c`](NixOS/nixpkgs@9693911) g2o: unstable-2019-04-07 -> 20200410 * [`5e124e5a`](NixOS/nixpkgs@5e124e5) nixos/tests: fix inclusion of hydra test * [`1b95c719`](NixOS/nixpkgs@1b95c71) nextcloud*: add `passthru.tests` to reference VM-tests * [`d44b9d30`](NixOS/nixpkgs@d44b9d3) multimc: 0.6.7 -> 0.6.11 * [`5905597f`](NixOS/nixpkgs@5905597) eksctl: 0.16.0 -> 0.17.0 * [`5aad6a36`](NixOS/nixpkgs@5aad6a3) common-updater: add update script to all-packages * [`2b985058`](NixOS/nixpkgs@2b98505) xfce: use updateScript from pkgs * [`6187d5ba`](NixOS/nixpkgs@6187d5b) poppler: 0.85.0 -> 0.86.1 * [`af72bf0a`](NixOS/nixpkgs@af72bf0) texlive.bin: fix for poppler 0.84 * [`796f9696`](NixOS/nixpkgs@796f969) poppler: 0.86.1 → 0.87.0 * [`03bfda01`](NixOS/nixpkgs@03bfda0) poppler: add freedesktop team to maintainers * [`bde95103`](NixOS/nixpkgs@bde9510) fira-code: 3 -> 3.1 * [`7ff456d2`](NixOS/nixpkgs@7ff456d) netdata: 1.21.0 -> 1.21.1 * [`95e007d6`](NixOS/nixpkgs@95e007d) netdata-go.d.plugin: 0.15.0 -> 0.18.0 * [`0eec2856`](NixOS/nixpkgs@0eec285) python3Packages.ibis: 1.2.0 -> 1.3.0, fix tests * [`e4dc2050`](NixOS/nixpkgs@e4dc205) agenda: 1.0.12 -> 1.1.0 * [`f646069c`](NixOS/nixpkgs@f646069) monitor: 0.6.2 -> 0.7.1 * [`fbd4290f`](NixOS/nixpkgs@fbd4290) monitor: add note how to use indicator. * [`c3408adb`](NixOS/nixpkgs@c3408ad) ephemeral: 6.3.1 -> 6.3.3 * [`8da467e0`](NixOS/nixpkgs@8da467e) pantheon.elementary-videos: 2.7.0 -> 2.7.1 * [`7eb0a87a`](NixOS/nixpkgs@7eb0a87) pantheon.pantheon-agent-geoclue2: 1.0.3 -> 1.0.4 * [`b57b6cdf`](NixOS/nixpkgs@b57b6cd) kubernetes: 1.18.0 -> 1.18.1 * [`342eaba9`](NixOS/nixpkgs@342eaba) cjdns: 20.5 -> 20.6 * [`c51b0afd`](NixOS/nixpkgs@c51b0af) firefox-wrapper: remove dead npapi plugin code * [`5c1c6429`](NixOS/nixpkgs@5c1c642) Revert "nixos/acme: Fix allowKeysForGroup not applying immediately" * [`ef2c3ab2`](NixOS/nixpkgs@ef2c3ab) chromium: 81.0.4044.92 -> 81.0.4044.113 * [`785eba0c`](NixOS/nixpkgs@785eba0) fd: 7.5.0 -> 8.0.0 * [`74d6e86e`](NixOS/nixpkgs@74d6e86) nixos/doc: fix database-setup example for matrix-synapse * [`bcfca556`](NixOS/nixpkgs@bcfca55) skalibs: 2.9.2.0 -> 2.9.2.1 * [`ffbf9af2`](NixOS/nixpkgs@ffbf9af) jitsi-meet-electron: 2.0.0 -> 2.0.2 * [`16477d76`](NixOS/nixpkgs@16477d7) google-chrome-{beta,dev}: Fix one substituteInPlace pattern * [`56f7c93a`](NixOS/nixpkgs@56f7c93) signal-desktop: 1.33.0 -> 1.33.1 * [`7c2fc1ce`](NixOS/nixpkgs@7c2fc1c) gitRepo: 2.5 -> 2.6 * [`4e0a6294`](NixOS/nixpkgs@4e0a629) ocamlPackages.erm_xmpp: 0.3+20180112 -> 0.3+20200317 * [`b271255e`](NixOS/nixpkgs@b271255) racket: use --enable-useprefix configure flag. * [`fa5ee6e5`](NixOS/nixpkgs@fa5ee6e) gifski: 0.10.2 -> 0.10.4 * [`f7500ace`](NixOS/nixpkgs@f7500ac) dkimpy: 1.0.2 -> 1.0.4 * [`88be9a1b`](NixOS/nixpkgs@88be9a1) python27Packages.foxdot: 0.8.5 -> 0.8.7 * [`d4659dec`](NixOS/nixpkgs@d4659de) grocy: 2.6.2 -> 2.7.0 * [`15e790ce`](NixOS/nixpkgs@15e790c) pythonPackages.configshell: 1.1.27 -> 1.1.28 * [`9e34eccb`](NixOS/nixpkgs@9e34ecc) pythonPackages.rtslib: 2.1.71 -> 2.1.72 * [`2355d9d5`](NixOS/nixpkgs@2355d9d) eclipse-scala-sdk: 4.4.1 -> 4.7.0 * [`4fd1f49e`](NixOS/nixpkgs@4fd1f49) vscodium: 1.44.0 -> 1.44.1 * [`c415d672`](NixOS/nixpkgs@c415d67) mozilla-plugins: remove all npapi plugins except for flash player * [`13c58fbb`](NixOS/nixpkgs@13c58fb) upwork: init at 5.3.3-883 * [`e14c4ba9`](NixOS/nixpkgs@e14c4ba) maintainers: add zakkor * [`dc85a2e5`](NixOS/nixpkgs@dc85a2e) megatools: 1.10.2 -> 1.10.3 * [`cd5bc89c`](NixOS/nixpkgs@cd5bc89) evcxr: 0.5.0 -> 0.5.1 * [`20252ee6`](NixOS/nixpkgs@20252ee) findomain: 1.4.5 -> 1.5.0 * [`e61c924a`](NixOS/nixpkgs@e61c924) mautrix-whatsapp: 2020-04-02 -> 2020-04-12 * [`9a4ee0c6`](NixOS/nixpkgs@9a4ee0c) scribusUnstable: Fix build with Poppler 0.86 * [`81c99685`](NixOS/nixpkgs@81c9968) pidgin-carbons: Remove no-longer-maintainer. * [`0b6602c9`](NixOS/nixpkgs@0b6602c) python3Packages.cirq: fix test failures (ZHF) * [`3b8a98d6`](NixOS/nixpkgs@3b8a98d) mpc-qt: 18.08 -> 2019-06-09 * [`91929349`](NixOS/nixpkgs@9192934) ipe: fix Qt wrapping * [`523152f8`](NixOS/nixpkgs@523152f) postcss-cli: init at 7.1.0 * [`c339130b`](NixOS/nixpkgs@c339130) vapoursynth: R48 -> R49 * [`ee6f5a32`](NixOS/nixpkgs@ee6f5a3) python38.pkgs.python-jsonrpc-server: disable for python38 * [`3679c8d2`](NixOS/nixpkgs@3679c8d) pcsc-cyberjack: 3.99.5_SP12 -> 3.99.5_SP13 * [`83cb2296`](NixOS/nixpkgs@83cb229) mopidy: Move mopidy default.nix to mopidy.nix * [`5340ebe0`](NixOS/nixpkgs@5340ebe) mopidy: Create a mopidyPackages set * [`cb5c0a4b`](NixOS/nixpkgs@cb5c0a4) chromium{Beta,Dev}: M81 -> M83 -> M84 * [`d9258d33`](NixOS/nixpkgs@d9258d3) linux: 4.19.115 -> 4.19.116 * [`e3411073`](NixOS/nixpkgs@e341107) linux: 5.4.32 -> 5.4.33 * [`056778b3`](NixOS/nixpkgs@056778b) crystal: 0.31 -> 0.34 (NixOS/nixpkgs#85432) * [`52c06182`](NixOS/nixpkgs@52c0618) nix-prefetch: 0.3.0 -> 0.3.1 (NixOS/nixpkgs#85367) * [`b584941a`](NixOS/nixpkgs@b584941) st: copy config file in 'prePatch' instead of 'preBuild' * [`bc138f40`](NixOS/nixpkgs@bc138f4) nixos/k3s: add initial k3s service * [`192485f8`](NixOS/nixpkgs@192485f) neomutt: 20200320 -> 20200417 * [`39b1de0f`](NixOS/nixpkgs@39b1de0) sv-kalendar: fix meta * [`572e8f60`](NixOS/nixpkgs@572e8f6) LTS Haskell 15.8 * [`629af9f5`](NixOS/nixpkgs@629af9f) hackage2nix: unbreak hasql-pool * [`83d84e62`](NixOS/nixpkgs@83d84e6) hackage2nix: unbreak postgrest * [`fd63776f`](NixOS/nixpkgs@fd63776) hackage2nix: update list of broken builds to fix evaluation errors * [`fd110322`](NixOS/nixpkgs@fd11032) hackage-packages.nix: automatic Haskell package set update * [`7932fb22`](NixOS/nixpkgs@7932fb2) ghcHEAD: bump to 8.11.20200403 (NixOS/nixpkgs#84217) * [`a0612c2a`](NixOS/nixpkgs@a0612c2) spago: 0.14.0 -> 0.15.1 * [`802dfc8b`](NixOS/nixpkgs@802dfc8) futhark: stop wrapping the executable * [`a762316e`](NixOS/nixpkgs@a762316) haskell simple-affine-space: Disable test suite * [`b95534aa`](NixOS/nixpkgs@b95534a) cut-the-crap: init at 1.0.0 * [`d59d157a`](NixOS/nixpkgs@d59d157) cabal-install-parsers: update Cabal dependency * [`53cfd1d1`](NixOS/nixpkgs@53cfd1d) haskell-tensorflow: unbreak * [`abc4f961`](NixOS/nixpkgs@abc4f96) haskellPackages.ghcWithPackages: fix for GHC 8.10 * [`d6aedf7b`](NixOS/nixpkgs@d6aedf7) haskell-ghc-lib-parser-ex: fix build with GHC versions prior to 8.8.x * [`783af05b`](NixOS/nixpkgs@783af05) all-cabal-hashes: update to Hackage at 2020-04-17T17:47:53Z * [`4fdc4555`](NixOS/nixpkgs@4fdc455) mesa-demos: init at 8.4.0 (NixOS/nixpkgs#74310) * [`c0a498b5`](NixOS/nixpkgs@c0a498b) pythonPackages.pdfrw: init at 0.4.0 * [`c881dd5e`](NixOS/nixpkgs@c881dd5) pythonPackages.pagelabels: init at 1.2.0 * [`839263d5`](NixOS/nixpkgs@839263d) termpdf.py: init at 2019-09-30 * [`2f33062f`](NixOS/nixpkgs@2f33062) flow: 0.122.0 -> 0.123.0 * [`135ae45d`](NixOS/nixpkgs@135ae45) grocy: 2.7.0 -> 2.7.1 * [`10100a97`](NixOS/nixpkgs@10100a9) ghc-8.10.x: add plenty of overrides to fix builds
Motivation for this change
Regular update and did some cleanups to make things a little neater. We
patch in the patch phase, install in the install phase and so on.
Also use some of the helpers we have available for shell completion and
man pages.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)