]> git.immae.eu Git - perso/Immae/Config/Nix/NUR.git/commitdiff
Remove yarn2nixPackage from lib
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Mon, 20 Apr 2020 00:59:22 +0000 (02:59 +0200)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Fri, 24 Apr 2020 22:04:58 +0000 (00:04 +0200)
lib/default.nix
pkgs/python-packages/buildbot/plugins/buildslist/default.nix
pkgs/webapps/grocy/default.nix
pkgs/webapps/grocy/yarn.patch
pkgs/webapps/mastodon/default.nix

index 86832d47fa868749d28b4076cf591e42b533bb12..26557ede380829f7dcb399f95722e3868c067791 100644 (file)
@@ -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:
index dc6104e4803be16ddc35d1999cc00277e2e61b35..273996ea7936af9665f5b16f5145afd2103eb305 100644 (file)
@@ -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 =
index 3a8e55a5921a66d0dcf1bc04d41b1f6ea978e705..f87f6ec0df20672dcac2ed16b0c497e366934eaa 100644 (file)
@@ -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 ];
       };
     };
   };
index d73bb4ec912bc370ffd7515f33714401b6f225b6..e6f318d5625e71f637a54764c6d564eb619a8e2b 100644 (file)
@@ -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"
index 3769b67fd899891110910acfa87190413b659dd0..ce015c5d7d4751d9525a1c152e6ab5d4278ff88b 100644 (file)
@@ -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