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

yarn2nix: Don't pass yarnNix to mkDerivation #92856

Merged
merged 1 commit into from Jul 10, 2020

Conversation

infinisil
Copy link
Member

Motivation for this change

The generated yarnNix file doesn't need to be part of the mkDerivation.
And doing so prevents other platforms from reproducibly instantiating
it. With this change you can e.g. do

darwinPkgs.yarn2nix.mkYarnPackage {
  # ...
  yarnNix = pkgs.yarn2nix.mkYarnNix {
    yarnLock = ./yarn.lock;
  };
}

Which is a darwin derivation, but can still be instantiated reproducibly on Linux.

Ping @zimbatm @moretea @petabyteboy

I will backport this to stable when merged.

This PR is sponsored by Niteo

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.

The generated yarnNix file doesn't need to be part of the mkDerivation.
And doing so prevents other platforms from reproducibly instantiating
it. With this change you can e.g. do

  darwinPkgs.yarn2nix.mkYarnPackage {
    # ...
    yarnNix = pkgs.yarn2nix.mkYarnNix {
      yarnLock = ./yarn.lock;
    };
  }

Which is a darwin derivation, but can still be instantiated reproducibly on Linux.
@zimbatm
Copy link
Member

zimbatm commented Jul 10, 2020

good call

infinisil added a commit that referenced this pull request Jul 10, 2020
The generated yarnNix file doesn't need to be part of the mkDerivation.
And doing so prevents other platforms from reproducibly instantiating
it. With this change you can e.g. do

  darwinPkgs.yarn2nix.mkYarnPackage {
    # ...
    yarnNix = pkgs.yarn2nix.mkYarnNix {
      yarnLock = ./yarn.lock;
    };
  }

Which is a darwin derivation, but can still be instantiated reproducibly on Linux.

(cherry picked from commit 75ee187)
@infinisil
Copy link
Member Author

Thanks, pushed to 20.03 in 68c599a

@infinisil infinisil deleted the yarn2nix-yarnNix branch July 10, 2020 17:10
github-actions bot added a commit to pbogdan/nix-hie that referenced this pull request Jul 11, 2020
## Motivation

Dependencies should be up to date.

## Changelog for stable:
Commits: [NixOS/nixpkgs@6a00eba0...68c599ac](NixOS/nixpkgs@6a00eba...68c599a)

* [`89be5297`](NixOS/nixpkgs@89be529) linux: 4.14.187 -> 4.14.188
* [`a2e7765f`](NixOS/nixpkgs@a2e7765) linux: 4.19.131 -> 4.19.132
* [`4c749a96`](NixOS/nixpkgs@4c749a9) linux: 4.4.229 -> 4.4.230
* [`105b998e`](NixOS/nixpkgs@105b998) linux: 4.9.229 -> 4.9.230
* [`4c4b2719`](NixOS/nixpkgs@4c4b271) linux: 5.4.50 -> 5.4.51
* [`ccf92d97`](NixOS/nixpkgs@ccf92d9) linux: 5.7.7 -> 5.7.8
* [`af92d300`](NixOS/nixpkgs@af92d30) chocolate-doom: 2.3.0 -> 3.0.0
* [`d2891652`](NixOS/nixpkgs@d289165) chocolateDoom: 3.0.0 -> 3.0.1
* [`7cc02125`](NixOS/nixpkgs@7cc0212) ruamel: moved from bitbucket to sourceforge
* [`a8688c7b`](NixOS/nixpkgs@a8688c7) ruamel: quote urls, update ordereddict url
* [`fe0b3004`](NixOS/nixpkgs@fe0b300) zfs: 0.8.3 -> 0.8.4
* [`cfde9cec`](NixOS/nixpkgs@cfde9ce) mautrix-whatsapp: 0.1.2 -> 0.1.3
* [`68c599ac`](NixOS/nixpkgs@68c599a) yarn2nix: Don't pass yarnNix to mkDerivation (NixOS/nixpkgs#92856)
github-actions bot added a commit to pbogdan/tag that referenced this pull request Jul 15, 2020
## Motivation

Dependencies should be up to date.

## Changelog for unstable:
Commits: [NixOS/nixpkgs@8d057721...c71518e7](NixOS/nixpkgs@8d05772...c71518e)

* [`e9d4298c`](NixOS/nixpkgs@e9d4298) perlPackages.AuthenKrb5: init at 1.905
* [`4dc4d5d6`](NixOS/nixpkgs@4dc4d5d) perlPackages.AuthenKrb5Admin: init at 0.17
* [`1919db94`](NixOS/nixpkgs@1919db9) capnproto: 0.7.0 -> 0.8.0
* [`7127dd3f`](NixOS/nixpkgs@7127dd3) gen-oath-safe: add dependency on file command
* [`874a47f8`](NixOS/nixpkgs@874a47f) colorls: 1.3.3 -> 1.4.2
* [`fe381b3c`](NixOS/nixpkgs@fe381b3) python3Packages.nmigen: from unstable-2020-02-08 to unstable-2020-04-02
* [`093e3275`](NixOS/nixpkgs@093e327) pcsctools: 1.5.6 -> 1.5.7
* [`14414670`](NixOS/nixpkgs@1441467) postgresql11Packages.pgrouting: 3.0.0 -> 3.0.1
* [`05a50430`](NixOS/nixpkgs@05a5043) nextcloud-client: 2.6.4 -> 2.6.5
* [`1e338c42`](NixOS/nixpkgs@1e338c4) python27Packages.bitarray: 1.2.2 -> 1.3.0
* [`34a56f20`](NixOS/nixpkgs@34a56f2) podman: 2.0.1 -> 2.0.2
* [`473519a2`](NixOS/nixpkgs@473519a) coqPackages.coq-extensible-records: enable for Coq 8.11 and 8.12
* [`d1a7237e`](NixOS/nixpkgs@d1a7237) coqPackages.coq-extensible-records: remove at 1.2.0
* [`77d5b41b`](NixOS/nixpkgs@77d5b41) castor: 0.8.15 -> 0.8.16
* [`f0fb57a0`](NixOS/nixpkgs@f0fb57a) terraform_0_13: init at 0.13.0-beta3
* [`428b4353`](NixOS/nixpkgs@428b435) webtorrent_desktop: 0.20.0 -> 0.21.0
* [`c255b0fa`](NixOS/nixpkgs@c255b0f) Revert "webtorrent_desktop: 0.20.0 -> 0.21.0"
* [`8095d0b8`](NixOS/nixpkgs@8095d0b) pcsctools: add missing dependencies for gscriptor
* [`e43685ef`](NixOS/nixpkgs@e43685e) mautrix-whatsapp: 0.1.2 -> 0.1.3
* [`21ed6c85`](NixOS/nixpkgs@21ed6c8) linux_latest-libre: 17537 -> 17559
* [`2371cb62`](NixOS/nixpkgs@2371cb6) linux/hardened/patches/4.14: 4.14.187.a -> 4.14.188.a
* [`4be3ad84`](NixOS/nixpkgs@4be3ad8) linux/hardened/patches/4.19: 4.19.131.a -> 4.19.132.a
* [`cda91537`](NixOS/nixpkgs@cda9153) linux/hardened/patches/5.4: 5.4.48.a -> 5.4.49.a
* [`af5accfa`](NixOS/nixpkgs@af5accf) linux/hardened/patches/5.7: 5.7.7.a -> 5.7.8.a
* [`0416089d`](NixOS/nixpkgs@0416089) linux: 5.8-rc2 -> 5.8-rc4
* [`75ee1876`](NixOS/nixpkgs@75ee187) yarn2nix: Don't pass yarnNix to mkDerivation (NixOS/nixpkgs#92856)
* [`a100503b`](NixOS/nixpkgs@a100503) gnome3.mutter: export libdir
* [`c3bbbb75`](NixOS/nixpkgs@c3bbbb7) python27Packages.pytest-isort: 1.0.0 -> 1.1.0
* [`3a32232c`](NixOS/nixpkgs@3a32232) python27Packages.wasabi: 0.6.0 -> 0.7.0
* [`c960abf5`](NixOS/nixpkgs@c960abf) trojita: 0.7.20190618 -> 0.7.20200706
* [`e96bf89d`](NixOS/nixpkgs@e96bf89) gnomeExtensions.system-monitor: unbreak with newer GNOME Shell
* [`57a53677`](NixOS/nixpkgs@57a5367) liburing: 0.6pre600 -> 0.7
* [`0d685127`](NixOS/nixpkgs@0d68512) rustup: 1.21.1 -> 1.22.1
* [`123ee325`](NixOS/nixpkgs@123ee32) smemstat: 0.02.07 -> 0.02.08
* [`d5ac1d5d`](NixOS/nixpkgs@d5ac1d5) python3Packages.msrest: 0.6.13 -> 0.6.17
* [`f7108ec4`](NixOS/nixpkgs@f7108ec) python3Packages.msrestazure: 0.6.3 -> 0.6.4
github-actions bot added a commit to pbogdan/nix-hie that referenced this pull request Jul 15, 2020
## Motivation

Dependencies should be up to date.

## Changelog for unstable:
Commits: [NixOS/nixpkgs@8d057721...c71518e7](NixOS/nixpkgs@8d05772...c71518e)

* [`e9d4298c`](NixOS/nixpkgs@e9d4298) perlPackages.AuthenKrb5: init at 1.905
* [`4dc4d5d6`](NixOS/nixpkgs@4dc4d5d) perlPackages.AuthenKrb5Admin: init at 0.17
* [`1919db94`](NixOS/nixpkgs@1919db9) capnproto: 0.7.0 -> 0.8.0
* [`7127dd3f`](NixOS/nixpkgs@7127dd3) gen-oath-safe: add dependency on file command
* [`874a47f8`](NixOS/nixpkgs@874a47f) colorls: 1.3.3 -> 1.4.2
* [`fe381b3c`](NixOS/nixpkgs@fe381b3) python3Packages.nmigen: from unstable-2020-02-08 to unstable-2020-04-02
* [`093e3275`](NixOS/nixpkgs@093e327) pcsctools: 1.5.6 -> 1.5.7
* [`14414670`](NixOS/nixpkgs@1441467) postgresql11Packages.pgrouting: 3.0.0 -> 3.0.1
* [`05a50430`](NixOS/nixpkgs@05a5043) nextcloud-client: 2.6.4 -> 2.6.5
* [`1e338c42`](NixOS/nixpkgs@1e338c4) python27Packages.bitarray: 1.2.2 -> 1.3.0
* [`34a56f20`](NixOS/nixpkgs@34a56f2) podman: 2.0.1 -> 2.0.2
* [`473519a2`](NixOS/nixpkgs@473519a) coqPackages.coq-extensible-records: enable for Coq 8.11 and 8.12
* [`d1a7237e`](NixOS/nixpkgs@d1a7237) coqPackages.coq-extensible-records: remove at 1.2.0
* [`77d5b41b`](NixOS/nixpkgs@77d5b41) castor: 0.8.15 -> 0.8.16
* [`f0fb57a0`](NixOS/nixpkgs@f0fb57a) terraform_0_13: init at 0.13.0-beta3
* [`428b4353`](NixOS/nixpkgs@428b435) webtorrent_desktop: 0.20.0 -> 0.21.0
* [`c255b0fa`](NixOS/nixpkgs@c255b0f) Revert "webtorrent_desktop: 0.20.0 -> 0.21.0"
* [`8095d0b8`](NixOS/nixpkgs@8095d0b) pcsctools: add missing dependencies for gscriptor
* [`e43685ef`](NixOS/nixpkgs@e43685e) mautrix-whatsapp: 0.1.2 -> 0.1.3
* [`21ed6c85`](NixOS/nixpkgs@21ed6c8) linux_latest-libre: 17537 -> 17559
* [`2371cb62`](NixOS/nixpkgs@2371cb6) linux/hardened/patches/4.14: 4.14.187.a -> 4.14.188.a
* [`4be3ad84`](NixOS/nixpkgs@4be3ad8) linux/hardened/patches/4.19: 4.19.131.a -> 4.19.132.a
* [`cda91537`](NixOS/nixpkgs@cda9153) linux/hardened/patches/5.4: 5.4.48.a -> 5.4.49.a
* [`af5accfa`](NixOS/nixpkgs@af5accf) linux/hardened/patches/5.7: 5.7.7.a -> 5.7.8.a
* [`0416089d`](NixOS/nixpkgs@0416089) linux: 5.8-rc2 -> 5.8-rc4
* [`75ee1876`](NixOS/nixpkgs@75ee187) yarn2nix: Don't pass yarnNix to mkDerivation (NixOS/nixpkgs#92856)
* [`a100503b`](NixOS/nixpkgs@a100503) gnome3.mutter: export libdir
* [`c3bbbb75`](NixOS/nixpkgs@c3bbbb7) python27Packages.pytest-isort: 1.0.0 -> 1.1.0
* [`3a32232c`](NixOS/nixpkgs@3a32232) python27Packages.wasabi: 0.6.0 -> 0.7.0
* [`c960abf5`](NixOS/nixpkgs@c960abf) trojita: 0.7.20190618 -> 0.7.20200706
* [`e96bf89d`](NixOS/nixpkgs@e96bf89) gnomeExtensions.system-monitor: unbreak with newer GNOME Shell
* [`57a53677`](NixOS/nixpkgs@57a5367) liburing: 0.6pre600 -> 0.7
* [`0d685127`](NixOS/nixpkgs@0d68512) rustup: 1.21.1 -> 1.22.1
* [`123ee325`](NixOS/nixpkgs@123ee32) smemstat: 0.02.07 -> 0.02.08
* [`d5ac1d5d`](NixOS/nixpkgs@d5ac1d5) python3Packages.msrest: 0.6.13 -> 0.6.17
* [`f7108ec4`](NixOS/nixpkgs@f7108ec) python3Packages.msrestazure: 0.6.3 -> 0.6.4
github-actions bot added a commit to pbogdan/nvs that referenced this pull request Jul 15, 2020
## Motivation

Dependencies should be up to date.

## Changelog for unstable:
Commits: [NixOS/nixpkgs@8d057721...c71518e7](NixOS/nixpkgs@8d05772...c71518e)

* [`e9d4298c`](NixOS/nixpkgs@e9d4298) perlPackages.AuthenKrb5: init at 1.905
* [`4dc4d5d6`](NixOS/nixpkgs@4dc4d5d) perlPackages.AuthenKrb5Admin: init at 0.17
* [`1919db94`](NixOS/nixpkgs@1919db9) capnproto: 0.7.0 -> 0.8.0
* [`7127dd3f`](NixOS/nixpkgs@7127dd3) gen-oath-safe: add dependency on file command
* [`874a47f8`](NixOS/nixpkgs@874a47f) colorls: 1.3.3 -> 1.4.2
* [`fe381b3c`](NixOS/nixpkgs@fe381b3) python3Packages.nmigen: from unstable-2020-02-08 to unstable-2020-04-02
* [`093e3275`](NixOS/nixpkgs@093e327) pcsctools: 1.5.6 -> 1.5.7
* [`14414670`](NixOS/nixpkgs@1441467) postgresql11Packages.pgrouting: 3.0.0 -> 3.0.1
* [`05a50430`](NixOS/nixpkgs@05a5043) nextcloud-client: 2.6.4 -> 2.6.5
* [`1e338c42`](NixOS/nixpkgs@1e338c4) python27Packages.bitarray: 1.2.2 -> 1.3.0
* [`34a56f20`](NixOS/nixpkgs@34a56f2) podman: 2.0.1 -> 2.0.2
* [`473519a2`](NixOS/nixpkgs@473519a) coqPackages.coq-extensible-records: enable for Coq 8.11 and 8.12
* [`d1a7237e`](NixOS/nixpkgs@d1a7237) coqPackages.coq-extensible-records: remove at 1.2.0
* [`77d5b41b`](NixOS/nixpkgs@77d5b41) castor: 0.8.15 -> 0.8.16
* [`f0fb57a0`](NixOS/nixpkgs@f0fb57a) terraform_0_13: init at 0.13.0-beta3
* [`428b4353`](NixOS/nixpkgs@428b435) webtorrent_desktop: 0.20.0 -> 0.21.0
* [`c255b0fa`](NixOS/nixpkgs@c255b0f) Revert "webtorrent_desktop: 0.20.0 -> 0.21.0"
* [`8095d0b8`](NixOS/nixpkgs@8095d0b) pcsctools: add missing dependencies for gscriptor
* [`e43685ef`](NixOS/nixpkgs@e43685e) mautrix-whatsapp: 0.1.2 -> 0.1.3
* [`21ed6c85`](NixOS/nixpkgs@21ed6c8) linux_latest-libre: 17537 -> 17559
* [`2371cb62`](NixOS/nixpkgs@2371cb6) linux/hardened/patches/4.14: 4.14.187.a -> 4.14.188.a
* [`4be3ad84`](NixOS/nixpkgs@4be3ad8) linux/hardened/patches/4.19: 4.19.131.a -> 4.19.132.a
* [`cda91537`](NixOS/nixpkgs@cda9153) linux/hardened/patches/5.4: 5.4.48.a -> 5.4.49.a
* [`af5accfa`](NixOS/nixpkgs@af5accf) linux/hardened/patches/5.7: 5.7.7.a -> 5.7.8.a
* [`0416089d`](NixOS/nixpkgs@0416089) linux: 5.8-rc2 -> 5.8-rc4
* [`75ee1876`](NixOS/nixpkgs@75ee187) yarn2nix: Don't pass yarnNix to mkDerivation (NixOS/nixpkgs#92856)
* [`a100503b`](NixOS/nixpkgs@a100503) gnome3.mutter: export libdir
* [`c3bbbb75`](NixOS/nixpkgs@c3bbbb7) python27Packages.pytest-isort: 1.0.0 -> 1.1.0
* [`3a32232c`](NixOS/nixpkgs@3a32232) python27Packages.wasabi: 0.6.0 -> 0.7.0
* [`c960abf5`](NixOS/nixpkgs@c960abf) trojita: 0.7.20190618 -> 0.7.20200706
* [`e96bf89d`](NixOS/nixpkgs@e96bf89) gnomeExtensions.system-monitor: unbreak with newer GNOME Shell
* [`57a53677`](NixOS/nixpkgs@57a5367) liburing: 0.6pre600 -> 0.7
* [`0d685127`](NixOS/nixpkgs@0d68512) rustup: 1.21.1 -> 1.22.1
* [`123ee325`](NixOS/nixpkgs@123ee32) smemstat: 0.02.07 -> 0.02.08
* [`d5ac1d5d`](NixOS/nixpkgs@d5ac1d5) python3Packages.msrest: 0.6.13 -> 0.6.17
* [`f7108ec4`](NixOS/nixpkgs@f7108ec) python3Packages.msrestazure: 0.6.3 -> 0.6.4
github-actions bot added a commit to pbogdan/nix-nerd-fonts that referenced this pull request Jul 15, 2020
## Motivation

Dependencies should be up to date.

## Changelog for unstable:
Commits: [NixOS/nixpkgs@8d057721...c71518e7](NixOS/nixpkgs@8d05772...c71518e)

* [`e9d4298c`](NixOS/nixpkgs@e9d4298) perlPackages.AuthenKrb5: init at 1.905
* [`4dc4d5d6`](NixOS/nixpkgs@4dc4d5d) perlPackages.AuthenKrb5Admin: init at 0.17
* [`1919db94`](NixOS/nixpkgs@1919db9) capnproto: 0.7.0 -> 0.8.0
* [`7127dd3f`](NixOS/nixpkgs@7127dd3) gen-oath-safe: add dependency on file command
* [`874a47f8`](NixOS/nixpkgs@874a47f) colorls: 1.3.3 -> 1.4.2
* [`fe381b3c`](NixOS/nixpkgs@fe381b3) python3Packages.nmigen: from unstable-2020-02-08 to unstable-2020-04-02
* [`093e3275`](NixOS/nixpkgs@093e327) pcsctools: 1.5.6 -> 1.5.7
* [`14414670`](NixOS/nixpkgs@1441467) postgresql11Packages.pgrouting: 3.0.0 -> 3.0.1
* [`05a50430`](NixOS/nixpkgs@05a5043) nextcloud-client: 2.6.4 -> 2.6.5
* [`1e338c42`](NixOS/nixpkgs@1e338c4) python27Packages.bitarray: 1.2.2 -> 1.3.0
* [`34a56f20`](NixOS/nixpkgs@34a56f2) podman: 2.0.1 -> 2.0.2
* [`473519a2`](NixOS/nixpkgs@473519a) coqPackages.coq-extensible-records: enable for Coq 8.11 and 8.12
* [`d1a7237e`](NixOS/nixpkgs@d1a7237) coqPackages.coq-extensible-records: remove at 1.2.0
* [`77d5b41b`](NixOS/nixpkgs@77d5b41) castor: 0.8.15 -> 0.8.16
* [`f0fb57a0`](NixOS/nixpkgs@f0fb57a) terraform_0_13: init at 0.13.0-beta3
* [`428b4353`](NixOS/nixpkgs@428b435) webtorrent_desktop: 0.20.0 -> 0.21.0
* [`c255b0fa`](NixOS/nixpkgs@c255b0f) Revert "webtorrent_desktop: 0.20.0 -> 0.21.0"
* [`8095d0b8`](NixOS/nixpkgs@8095d0b) pcsctools: add missing dependencies for gscriptor
* [`e43685ef`](NixOS/nixpkgs@e43685e) mautrix-whatsapp: 0.1.2 -> 0.1.3
* [`21ed6c85`](NixOS/nixpkgs@21ed6c8) linux_latest-libre: 17537 -> 17559
* [`2371cb62`](NixOS/nixpkgs@2371cb6) linux/hardened/patches/4.14: 4.14.187.a -> 4.14.188.a
* [`4be3ad84`](NixOS/nixpkgs@4be3ad8) linux/hardened/patches/4.19: 4.19.131.a -> 4.19.132.a
* [`cda91537`](NixOS/nixpkgs@cda9153) linux/hardened/patches/5.4: 5.4.48.a -> 5.4.49.a
* [`af5accfa`](NixOS/nixpkgs@af5accf) linux/hardened/patches/5.7: 5.7.7.a -> 5.7.8.a
* [`0416089d`](NixOS/nixpkgs@0416089) linux: 5.8-rc2 -> 5.8-rc4
* [`75ee1876`](NixOS/nixpkgs@75ee187) yarn2nix: Don't pass yarnNix to mkDerivation (NixOS/nixpkgs#92856)
* [`a100503b`](NixOS/nixpkgs@a100503) gnome3.mutter: export libdir
* [`c3bbbb75`](NixOS/nixpkgs@c3bbbb7) python27Packages.pytest-isort: 1.0.0 -> 1.1.0
* [`3a32232c`](NixOS/nixpkgs@3a32232) python27Packages.wasabi: 0.6.0 -> 0.7.0
* [`c960abf5`](NixOS/nixpkgs@c960abf) trojita: 0.7.20190618 -> 0.7.20200706
* [`e96bf89d`](NixOS/nixpkgs@e96bf89) gnomeExtensions.system-monitor: unbreak with newer GNOME Shell
* [`57a53677`](NixOS/nixpkgs@57a5367) liburing: 0.6pre600 -> 0.7
* [`0d685127`](NixOS/nixpkgs@0d68512) rustup: 1.21.1 -> 1.22.1
* [`123ee325`](NixOS/nixpkgs@123ee32) smemstat: 0.02.07 -> 0.02.08
* [`d5ac1d5d`](NixOS/nixpkgs@d5ac1d5) python3Packages.msrest: 0.6.13 -> 0.6.17
* [`f7108ec4`](NixOS/nixpkgs@f7108ec) python3Packages.msrestazure: 0.6.3 -> 0.6.4
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

2 participants