From 84c6c827b76bd7296355fd5cc6c96eff25968f6e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Isma=C3=ABl=20Bouya?= Date: Mon, 20 Apr 2020 02:59:22 +0200 Subject: [PATCH] Remove yarn2nixPackage from lib --- lib/default.nix | 9 --------- .../buildbot/plugins/buildslist/default.nix | 5 ++--- pkgs/webapps/grocy/default.nix | 6 +++--- pkgs/webapps/grocy/yarn.patch | 15 +++++++++------ pkgs/webapps/mastodon/default.nix | 10 ++++------ 5 files changed, 18 insertions(+), 27 deletions(-) diff --git a/lib/default.nix b/lib/default.nix index 86832d47..26557ede 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -1,15 +1,6 @@ { pkgs }: with pkgs; rec { - yarn2nixPackage = let - src = builtins.fetchGit { - url = "git://github.com/moretea/yarn2nix.git"; - ref = "master"; - rev = "780e33a07fd821e09ab5b05223ddb4ca15ac663f"; - }; - in - (callPackage src {}) // { inherit src; }; - nodeEnv = import ./node-env.nix; fetchedGithub = path: diff --git a/pkgs/python-packages/buildbot/plugins/buildslist/default.nix b/pkgs/python-packages/buildbot/plugins/buildslist/default.nix index dc6104e4..273996ea 100644 --- a/pkgs/python-packages/buildbot/plugins/buildslist/default.nix +++ b/pkgs/python-packages/buildbot/plugins/buildslist/default.nix @@ -1,4 +1,4 @@ -{ mylibs, stdenv, runCommand, writeScriptBin, buildBowerComponents, pythonPackages, libsass, python, fetchurl, jq, yarn, nodejs }: +{ mylibs, stdenv, runCommand, writeScriptBin, buildBowerComponents, pythonPackages, libsass, python, fetchurl, jq, yarn, nodejs, yarn2nix-moretea }: let buildslist_src = mylibs.fetchedGit ./buildslist.json; packagejson = runCommand "package.json" { buildInputs = [ jq ]; } '' @@ -8,7 +8,7 @@ let url = "https://nodejs.org/download/release/v${nodejs.version}/node-v${nodejs.version}-headers.tar.gz"; sha256 = "1df3yhlwlvai0m9kvjyknjg11hnw0kj0rnhyzbwvsfjnmr6z8r76"; }; - buildslist_yarn = mylibs.yarn2nixPackage.mkYarnModules rec { + buildslist_yarn = yarn2nix-moretea.mkYarnModules rec { name = "buildslist-yarn-modules"; pname = name; inherit (pythonPackages.buildbot-pkg) version; @@ -16,7 +16,6 @@ let yarnLock = "${buildslist_src.src}/yarn.lock"; yarnNix = ./yarn-packages.nix; pkgConfig = { - all = { buildInputs = [ mylibs.yarn2nixPackage.src ]; }; node-sass = { buildInputs = [ libsass python ]; postInstall = diff --git a/pkgs/webapps/grocy/default.nix b/pkgs/webapps/grocy/default.nix index 3a8e55a5..f87f6ec0 100644 --- a/pkgs/webapps/grocy/default.nix +++ b/pkgs/webapps/grocy/default.nix @@ -1,4 +1,4 @@ -{ varDir ? "/var/lib/grocy", stdenv, callPackage, composerEnv, fetchurl, mylibs, runCommand, git, which, jq }: +{ varDir ? "/var/lib/grocy", stdenv, callPackage, composerEnv, fetchurl, mylibs, runCommand, git, which, jq, yarn2nix-moretea }: let version = "2.6.1-1"; packagesource = mylibs.fetchedGithub ./grocy.json; @@ -11,7 +11,7 @@ let cp yarn.lock $out/ ''; }); - yarnModules = mylibs.yarn2nixPackage.mkYarnModules rec { + yarnModules = yarn2nix-moretea.mkYarnModules rec { name = "grocy-yarn"; pname = name; version = version; @@ -20,7 +20,7 @@ let yarnNix = ./yarn-packages.nix; pkgConfig = { all = { - buildInputs = [ git which mylibs.yarn2nixPackage.src ]; + buildInputs = [ git which ]; }; }; }; diff --git a/pkgs/webapps/grocy/yarn.patch b/pkgs/webapps/grocy/yarn.patch index d73bb4ec..e6f318d5 100644 --- a/pkgs/webapps/grocy/yarn.patch +++ b/pkgs/webapps/grocy/yarn.patch @@ -24,10 +24,10 @@ index 1afdf44..8acc985 100644 "toastr": "^2.1.4" } diff --git a/yarn.lock b/yarn.lock -index dfb3108..e96bb35 100644 +index dfb3108..7f8d761 100644 --- a/yarn.lock +++ b/yarn.lock -@@ -2,18 +2,18 @@ +@@ -2,18 +2,20 @@ # yarn lockfile v1 @@ -35,7 +35,8 @@ index dfb3108..e96bb35 100644 +"@danielfarrell/bootstrap-combobox@^1.1.8": version "1.1.8" - resolved "https://github.com/berrnd/bootstrap-combobox.git#fcf0110146f4daab94888234c57d198b4ca5f129" -+ resolved "https://github.com/berrnd/bootstrap-combobox/archive/fcf0110146f4daab94888234c57d198b4ca5f129.tar.gz" ++ resolved "https://github.com/berrnd/bootstrap-combobox/archive/fcf0110146f4daab94888234c57d198b4ca5f129.tar.gz#dummy" ++ integrity sha512-svyqYhH2HYrgJtPhyGF/dydpERR9UIdKo7WUGcXbSnEqwSUQjcCh8ILhn+Ze0eqKf/zQCejrDrWl/578t9rz3Q== "@fortawesome/fontawesome-free@^5.12.1": version "5.12.1" @@ -46,11 +47,12 @@ index dfb3108..e96bb35 100644 +"TagManager@^3.0.1": version "3.0.1" - resolved "https://github.com/max-favilli/tagmanager.git#b43646ef2f2373facaf21c7acc5e3eea61188d76" -+ resolved "https://github.com/max-favilli/tagmanager/archive/b43646ef2f2373facaf21c7acc5e3eea61188d76.tar.gz" ++ resolved "https://github.com/max-favilli/tagmanager/archive/b43646ef2f2373facaf21c7acc5e3eea61188d76.tar.gz#dummy" ++ integrity sha512-lisa2KW8z+7kmPT+QAkR2FC2LGE2rCPmQ4Qt8+hF83hoTuqoc3sqpRha14oqYfCjKufXGGCdH3sQG5xdHABkTA== dependencies: jquery "1" -@@ -719,9 +719,9 @@ swagger-ui-dist@^3.23.10: +@@ -719,9 +721,10 @@ swagger-ui-dist@^3.23.10: resolved "https://registry.yarnpkg.com/swagger-ui-dist/-/swagger-ui-dist-3.25.0.tgz#90279cdcc56e591fcfbe7b5240a9d653b989336d" integrity sha512-vwvJPPbdooTvDwLGzjIXinOXizDJJ6U1hxnJL3y6U3aL1d2MSXDmKg2139XaLBhsVZdnQJV2bOkX4reB+RXamg== @@ -58,7 +60,8 @@ index dfb3108..e96bb35 100644 +"tempusdominus-bootstrap-4@^5.1.2": version "5.1.2" - resolved "https://github.com/berrnd/tempusdominus-bootstrap-4.git#2cf725fed9216cb77a298e5ce46762bfe979eaa0" -+ resolved "https://github.com/berrnd/tempusdominus-bootstrap-4/archive/2cf725fed9216cb77a298e5ce46762bfe979eaa0.tar.gz" ++ resolved "https://github.com/berrnd/tempusdominus-bootstrap-4/archive/2cf725fed9216cb77a298e5ce46762bfe979eaa0.tar.gz#dummy" ++ integrity sha512-xYDSn8Gb8GicQHt6Ax9VULKSviPrEm7Fpk5WpSY2qBfX1hQbDiEhBZXcWIlgVBPWQmJoUSPzLpe0B2xbOmjaeg== dependencies: bootstrap ">=4.1.2" jquery "^3.0" diff --git a/pkgs/webapps/mastodon/default.nix b/pkgs/webapps/mastodon/default.nix index 3769b67f..ce015c5d 100644 --- a/pkgs/webapps/mastodon/default.nix +++ b/pkgs/webapps/mastodon/default.nix @@ -1,15 +1,16 @@ { varDir ? "/var/lib/mastodon", mylibs, stdenv, writeText, runCommand, ruby_2_6, bundlerEnv, defaultGemConfig, - jq, protobuf, protobufc, pkgconfig, libidn, pam, nodejs, yarn }: + jq, protobuf, protobufc, pkgconfig, libidn, pam, nodejs, yarn, yarn2nix-moretea }: let info = mylibs.fetchedGithub ./mastodon.json // { - src= runCommand "mastodon-patched" { + src = runCommand "mastodon-patched" { source = (mylibs.fetchedGithub ./mastodon.json).src; } '' cp -a $source $out chmod -R u+w $out sed -i -e "/fuubar/s/2.4.0/2.4.1/" $out/Gemfile.lock + sed -i -e "s/ff00dc470b5b2d9f145a6d6e977a54de5df2b4c9/ff00dc470b5b2d9f145a6d6e977a54de5df2b4c9#4255dc41fa7df9c3a02c1595f058e248bc37b784/" $out/yarn.lock ''; }; gems = bundlerEnv { @@ -45,7 +46,7 @@ let cat ${info.src}/package.json | jq -r '.version = "${info.version}"' > $out ''; in - mylibs.yarn2nixPackage.mkYarnModules rec { + yarn2nix-moretea.mkYarnModules rec { name = "mastodon-yarn"; pname = name; version = info.version; @@ -53,9 +54,6 @@ let yarnLock = "${info.src}/yarn.lock"; yarnNix = ./yarn-packages.nix; pkgConfig = { - all = { - buildInputs = [ mylibs.yarn2nixPackage.src ]; - }; uws = { postInstall = '' npx node-gyp rebuild > build_log.txt 2>&1 || true -- 2.41.0