]> git.immae.eu Git - perso/Immae/Config/Nix.git/commitdiff
Use overlays for package overrides
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Fri, 26 Apr 2019 11:52:30 +0000 (13:52 +0200)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Fri, 26 Apr 2019 11:57:04 +0000 (13:57 +0200)
27 files changed:
default.nix
fetched/ledger.json [deleted file]
fetched/stgit.json [deleted file]
overlays/default.nix [new file with mode: 0644]
overlays/dwm/default.nix [new file with mode: 0644]
overlays/dwm/dwm_config.h [moved from patches/dwm_config.h with 100% similarity]
overlays/elinks/default.nix [new file with mode: 0644]
overlays/elinks/elinks.json [moved from fetched/elinks.json with 100% similarity]
overlays/goaccess/default.nix [new file with mode: 0644]
overlays/ldapvi/default.nix [new file with mode: 0644]
overlays/ldapvi/ldapvi.json [moved from fetched/ldapvi.json with 100% similarity]
overlays/lesspipe/default.nix [new file with mode: 0644]
overlays/neomutt/default.nix [new file with mode: 0644]
overlays/nixops/default.nix [new file with mode: 0644]
overlays/pass/default.nix [new file with mode: 0644]
overlays/pass/pass-fix-pass-init.patch [moved from patches/pass-fix-pass-init.patch with 100% similarity]
overlays/pass/pass.json [moved from fetched/pass.json with 100% similarity]
overlays/pelican/default.nix [new file with mode: 0644]
overlays/pelican/pelican.json [moved from fetched/pelican.json with 100% similarity]
overlays/profanity/default.nix [new file with mode: 0644]
overlays/sc-im/default.nix [new file with mode: 0644]
overlays/slrn/default.nix [new file with mode: 0644]
overlays/taskwarrior/default.nix [new file with mode: 0644]
overlays/vit/default.nix [new file with mode: 0644]
overlays/vit/vit.json [moved from fetched/vit.json with 100% similarity]
overlays/weboob/default.nix [new file with mode: 0644]
overlays/weechat/default.nix [new file with mode: 0644]

index ae3b2b76bedaade975f60b7e8e961af533b3846b..1bac63e08df807b70927dca0a71aaf97044ef8e2 100644 (file)
-with import <nixpkgs> {};
-with import ./libs.nix { nixpkgs = import <nixpkgs> {}; };
-let
-  mypkgs = {};
-
-  mypkgs.taskwarrior = taskwarrior.overrideAttrs (old: rec {
-    postInstall = ''${old.postInstall}
-      mkdir -p "$out/share/vim/vimfiles/ftdetect"
-      mkdir -p "$out/share/vim/vimfiles/syntax"
-      ln -s "../../../../share/doc/task/scripts/vim/ftdetect/task.vim" "$out/share/vim/vimfiles/ftdetect/"
-      ln -s "../../../../share/doc/task/scripts/vim/syntax/taskrc.vim" "$out/share/vim/vimfiles/syntax/"
-      ln -s "../../../../share/doc/task/scripts/vim/syntax/taskdata.vim" "$out/share/vim/vimfiles/syntax/"
-      ln -s "../../../../share/doc/task/scripts/vim/syntax/taskedit.vim" "$out/share/vim/vimfiles/syntax/"
-    '';
-  });
-
-  mypkgs.vit = (vit.override { taskwarrior = mypkgs.taskwarrior; }).overrideAttrs (old:
-    fetchedGithub ./fetched/vit.json // {
-      buildInputs = old.buildInputs ++ [perlPackages.TryTiny perlPackages.TextCharWidth];
-    }
-  );
-
-  mypkgs.weboob = (pythonPackages.weboob.overridePythonAttrs {
-      setupPyBuildFlags = [ "--no-qt" "--xdg" ];
-    }).overrideAttrs (old: rec {
-      version = "1.5";
-      src = fetchurl {
-        url = "https://git.weboob.org/weboob/weboob/-/archive/${version}/${old.pname}-${version}.tar.gz";
-        sha256 = "0l6q5nm5g0zn6gmf809059kddrbds27wgygxsfkqja9blks5vq7z";
-      };
-      postInstall = ''${old.postInstall or ""}
-        mkdir -p $out/share/bash-completion/completions/
-        cp tools/weboob_bash_completion $out/share/bash-completion/completions/weboob
-      '';
-  });
-
-  mypkgs.slrn = slrn.overrideAttrs (old: rec {
-    version = "1.0.3a";
-    name = "slrn-${version}";
-    src = fetchurl {
-      url = "http://www.jedsoft.org/releases/slrn/slrn-${version}.tar.bz2";
-      sha256 = "1b1d9iikr60w0vq86y9a0l4gjl0jxhdznlrdp3r405i097as9a1v";
+with import <nixpkgs> { overlays = builtins.attrValues (import ./overlays); };
+with mylibs;
+  # https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh
+  # https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks
+  {
+    boinctui = callPackage ./pkgs/boinctui {};
+    cnagios = callPackage ./pkgs/cnagios { inherit fetchedGithub; };
+    duply = callPackage ./pkgs/duply {};
+    flrn = callPackage ./pkgs/flrn {
+      slang = callPackage ./pkgs/slang_1 {};
+      inherit fetchedGithub;
     };
-    configureFlags = old.configureFlags ++ [ "--with-slrnpull" ];
-  });
-
-  mypkgs.ldapvi = ldapvi.overrideAttrs (old: fetchedGit ./fetched/ldapvi.json);
-
-  nixos = import ./nixos_tools.nix {};
-
-  mypkgs.pass = (pass.withExtensions (exts: [ exts.pass-otp ])).overrideAttrs (old:
-    fetchedGit ./fetched/pass.json // {
-      patches = old.patches ++ [ ./patches/pass-fix-pass-init.patch ];
-    }
-  );
-
-  mypkgs.profanity = (profanity.override {
-    notifySupport = true;
-    inherit libnotify gpgme gdk_pixbuf;
-    python = python3;
-  }).overrideAttrs (old: rec {
-    configureFlags = old.configureFlags ++ [ "--enable-plugins" ];
-  });
-
-  mypkgs.weechat = weechat.override {
-    configure = { availablePlugins, ... }: {
-      plugins = with availablePlugins; [
-          # Make sure websocket_client is not 0.55.0, it provokes
-          # regular crashes
-         (python.withPackages (ps: with ps; [websocket_client emoji]))
-         perl
-         ruby
-        ];
+    genius = callPackage ./pkgs/genius {};
+    mtop = callPackage ./pkgs/mtop {};
+    muttprint = callPackage ./pkgs/muttprint {};
+    mutt-ics = callPackage ./pkgs/mutt-ics { inherit fetchedGithub; };
+    nagios-cli = callPackage ./pkgs/nagios-cli { inherit fetchedGithub; };
+    #nagnu = callPackage ./pkgs/nagnu { inherit fetchedGithub; };
+    note = callPackage ./pkgs/note {};
+    notmuch-python2 = callPackage ./pkgs/notmuch/notmuch-python { pythonPackages = python2Packages; };
+    notmuch-python3 = callPackage ./pkgs/notmuch/notmuch-python { pythonPackages = python3Packages; };
+    notmuch-vim = callPackage ./pkgs/notmuch/notmuch-vim {};
+    pg_activity = callPackage ./pkgs/pg_activity { inherit fetchedGithub; };
+    pgloader = callPackage ./pkgs/pgloader { inherit fetchedGithub; };
+    telegram-cli = callPackage ./pkgs/telegram-cli { inherit fetchedGithub; };
+    telegram-history-dump = callPackage ./pkgs/telegram-history-dump { inherit fetchedGithub; };
+    telegramircd = callPackage ./pkgs/telegramircd {
+      telethon = callPackage ./pkgs/telethon_sync {};
+      inherit fetchedGithub;
     };
-  };
-
-  mypkgs.boinctui = callPackage ./pkgs/boinctui {};
-  mypkgs.cnagios = callPackage ./pkgs/cnagios { inherit fetchedGithub; };
-  mypkgs.duply = callPackage ./pkgs/duply {};
-  mypkgs.flrn = callPackage ./pkgs/flrn {
-    slang = callPackage ./pkgs/slang_1 {};
-    inherit fetchedGithub;
-  };
-  mypkgs.genius = callPackage ./pkgs/genius {};
-  mypkgs.mtop = callPackage ./pkgs/mtop {};
-  mypkgs.muttprint = callPackage ./pkgs/muttprint {};
-  mypkgs.mutt-ics = callPackage ./pkgs/mutt-ics { inherit fetchedGithub; };
-  mypkgs.nagios-cli = callPackage ./pkgs/nagios-cli { inherit fetchedGithub; };
-  #mypkgs.nagnu = callPackage ./pkgs/nagnu { inherit fetchedGithub; };
-  mypkgs.note = callPackage ./pkgs/note {};
-  mypkgs.notmuch-python2 = callPackage ./pkgs/notmuch/notmuch-python { pythonPackages = python2Packages; };
-  mypkgs.notmuch-python3 = callPackage ./pkgs/notmuch/notmuch-python { pythonPackages = python3Packages; };
-  mypkgs.notmuch-vim = callPackage ./pkgs/notmuch/notmuch-vim {};
-  mypkgs.pg_activity = callPackage ./pkgs/pg_activity { inherit fetchedGithub; };
-  mypkgs.pgloader = callPackage ./pkgs/pgloader { inherit fetchedGithub; };
-  mypkgs.telegram-cli = callPackage ./pkgs/telegram-cli { inherit fetchedGithub; };
-  mypkgs.telegram-history-dump = callPackage ./pkgs/telegram-history-dump { inherit fetchedGithub; };
-  mypkgs.telegramircd = callPackage ./pkgs/telegramircd {
-    telethon = callPackage ./pkgs/telethon_sync {};
-    inherit fetchedGithub;
-  };
-  mypkgs.terminal-velocity = callPackage ./pkgs/terminal-velocity {};
-  mypkgs.tiv = callPackage ./pkgs/tiv {};
-  mypkgs.unicode = callPackage ./pkgs/unicode {};
-
-  mypkgs.cardano = callPackage ./pkgs/crypto/cardano { inherit fetchedGithub; };
-  mypkgs.iota-cli-app = callPackage ./pkgs/crypto/iota-cli-app { inherit fetchedGithub; };
-  mypkgs.sia = callPackage ./pkgs/crypto/sia {};
-
-  mypkgs.pelican = python3Packages.pelican.overrideAttrs(old: fetchedGithub ./fetched/pelican.json // rec {
-    propagatedBuildInputs = old.propagatedBuildInputs ++ [ python3Packages.pyyaml ];
-  });
-
-  mypkgs.elinks = elinks.overrideAttrs (old:
-    fetchedGithub ./fetched/elinks.json // rec {
-      preConfigure = ''sh autogen.sh'';
-      buildInputs = old.buildInputs ++ [ gettext automake autoconf ];
-      configureFlags = [
-        "--disable-smb" "--without-x" "--enable-cgi"
-        "--enable-leds" "--enable-256-colors"
-        "--enable-html-highlight" "--with-zlib"
-        ];
-      patches = [];
-    }
-  );
-
-  mypkgs.neomutt = neomutt.overrideAttrs (old:
-    rec {
-      buildInputs = old.buildInputs ++ [ gdbm ];
-      configureFlags = old.configureFlags ++ [ "--gdbm" ];
-    }
-  );
-
-  mypkgs.goaccess = goaccess.overrideAttrs(old: rec {
-    name = "goaccess-${version}";
-    version = "1.3";
-    src = fetchurl {
-      url = "https://tar.goaccess.io/${name}.tar.gz";
-      sha256 = "16vv3pj7pbraq173wlxa89jjsd279004j4kgzlrsk1dz4if5qxwc";
-    };
-    configureFlags = old.configureFlags ++ [ "--enable-tcb=btree" ];
-    buildInputs = old.buildInputs ++ [ tokyocabinet bzip2 ];
-  });
-
-  mypkgs.yarn2nix = yarn2nixPackage.yarn2nix;
-
-
-  mypkgs.sc-im = sc-im.overrideAttrs (old: {
-    buildPhase = ''
-      cd src
-      sed -i Makefile -e 's@\...name.info@.local/state/$(name)info@'
-      cd ..
-      '' + old.buildPhase;
-  });
-
-  mypkgs.lesspipe = lesspipe.overrideAttrs(old: {
-    configureFlags = (old.configureFlags or []) ++ [ "--yes" ];
-  });
-
-
-  mypkgs.dwm = dwm.overrideAttrs(old: rec {
-    postPatch = ''
-      cp ${./patches/dwm_config.h} ./config.h
-      '';
-  });
-
-  mypkgs.nixops = nixops.overrideAttrs (old: {
-    preConfigure = (old.preConfigure or "") + ''
-      sed -i -e "/'keyFile'/s/'path'/'string'/" nixops/backends/__init__.py
-      '';
-  });
-# https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh
-# https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks
-in
-  mypkgs // {
+    terminal-velocity = callPackage ./pkgs/terminal-velocity {};
+    tiv = callPackage ./pkgs/tiv {};
+    unicode = callPackage ./pkgs/unicode {};
+
+    cardano = callPackage ./pkgs/crypto/cardano { inherit fetchedGithub; };
+    iota-cli-app = callPackage ./pkgs/crypto/iota-cli-app { inherit fetchedGithub; };
+    sia = callPackage ./pkgs/crypto/sia {};
+  } // { # overlays
+    inherit weboob;
+    inherit taskwarrior;
+    inherit slrn;
+    inherit sc-im;
+    inherit lesspipe;
+    inherit neomutt;
+    inherit weechat;
+    inherit goaccess;
+    inherit profanity;
+    inherit nixops;
+    inherit dwm;
+    inherit vit;
+    inherit pass;
+    inherit elinks;
+    inherit pelican;
+    inherit ldapvi;
+    inherit (mylibs.yarn2nixPackage) yarn2nix;
+  } // {
     inherit nix-prefetch-scripts;
     inherit nix-generate-from-cpan;
     inherit timewarrior;
@@ -222,7 +103,6 @@ in
     inherit lzo unzip bzip2 p7zip xz;
     # unrar is unfree
     inherit tig;
-    #inherit nixos;
     inherit emacs26-nox;
     inherit highlight sourceHighlight;
     pygmentize = python3Packages.pygments;
diff --git a/fetched/ledger.json b/fetched/ledger.json
deleted file mode 100644 (file)
index 6ea613b..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-{
-  "tag": "7567fb7-next",
-  "meta": {
-    "name": "ledger",
-    "url": "https://github.com/ledger/ledger",
-    "branch": "next"
-  },
-  "github": {
-    "owner": "ledger",
-    "repo": "ledger",
-    "rev": "7567fb7595c9937088abec6caaf7b59f8e2e772a",
-    "sha256": "07482bvd0mnvaad116cjlmg3ls6bg0ksy23gc99lmyz35nbf25v1",
-    "fetchSubmodules": true
-  }
-}
diff --git a/fetched/stgit.json b/fetched/stgit.json
deleted file mode 100644 (file)
index 4b9575e..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-{
-  "tag": "v0.19",
-  "meta": {
-    "name": "stgit",
-    "url": "https://github.com/ctmarinas/stgit",
-    "branch": "refs/tags/v0.19"
-  },
-  "github": {
-    "owner": "ctmarinas",
-    "repo": "stgit",
-    "rev": "ac22e13b123f5aff693926c995bb29cf7c114c2b",
-    "sha256": "1dzl6cnyzwbzysp82x7w1yc03g25kwan3h0zpnzhhfhg6c904sis",
-    "fetchSubmodules": true
-  }
-}
diff --git a/overlays/default.nix b/overlays/default.nix
new file mode 100644 (file)
index 0000000..a2d9927
--- /dev/null
@@ -0,0 +1,20 @@
+{
+  mylibs = self: super: { mylibs = import ../libs.nix { nixpkgs = self; }; };
+
+  dwm = import ./dwm;
+  elinks = import ./elinks;
+  goaccess = import ./goaccess;
+  ldapvi = import ./ldapvi;
+  lesspipe = import ./lesspipe;
+  neomutt = import ./neomutt;
+  nixops = import ./nixops;
+  pass = import ./pass;
+  pelican = import ./pelican;
+  profanity = import ./profanity;
+  sc-im = import ./sc-im;
+  slrn = import ./slrn;
+  taskwarrior = import ./taskwarrior;
+  vit = import ./vit;
+  weboob = import ./weboob;
+  weechat = import ./weechat;
+}
diff --git a/overlays/dwm/default.nix b/overlays/dwm/default.nix
new file mode 100644 (file)
index 0000000..96ed3ff
--- /dev/null
@@ -0,0 +1,7 @@
+self: super: {
+  dwm = super.dwm.overrideAttrs(old: rec {
+    postPatch = ''
+      cp ${./dwm_config.h} ./config.h
+      '';
+  });
+}
diff --git a/overlays/elinks/default.nix b/overlays/elinks/default.nix
new file mode 100644 (file)
index 0000000..1744dc0
--- /dev/null
@@ -0,0 +1,14 @@
+self: super: {
+  elinks = super.elinks.overrideAttrs (old:
+    self.mylibs.fetchedGithub ./elinks.json // rec {
+      preConfigure = ''sh autogen.sh'';
+      buildInputs = old.buildInputs ++ (with self; [ gettext automake autoconf ]);
+      configureFlags = [
+        "--disable-smb" "--without-x" "--enable-cgi"
+        "--enable-leds" "--enable-256-colors"
+        "--enable-html-highlight" "--with-zlib"
+        ];
+      patches = [];
+    }
+  );
+}
diff --git a/overlays/goaccess/default.nix b/overlays/goaccess/default.nix
new file mode 100644 (file)
index 0000000..12b28f3
--- /dev/null
@@ -0,0 +1,13 @@
+self: super: {
+  goaccess = super.goaccess.overrideAttrs(old: rec {
+    name = "goaccess-${version}";
+    version = "1.3";
+    src = self.fetchurl {
+      url = "https://tar.goaccess.io/${name}.tar.gz";
+      sha256 = "16vv3pj7pbraq173wlxa89jjsd279004j4kgzlrsk1dz4if5qxwc";
+    };
+    configureFlags = old.configureFlags ++ [ "--enable-tcb=btree" ];
+    buildInputs = old.buildInputs ++ [ self.tokyocabinet self.bzip2 ];
+  });
+
+}
diff --git a/overlays/ldapvi/default.nix b/overlays/ldapvi/default.nix
new file mode 100644 (file)
index 0000000..030e676
--- /dev/null
@@ -0,0 +1,3 @@
+self: super: {
+  ldapvi = super.ldapvi.overrideAttrs (old: self.mylibs.fetchedGit ./ldapvi.json);
+}
diff --git a/overlays/lesspipe/default.nix b/overlays/lesspipe/default.nix
new file mode 100644 (file)
index 0000000..e53feae
--- /dev/null
@@ -0,0 +1,5 @@
+self: super: {
+  lesspipe = super.lesspipe.overrideAttrs(old: {
+    configureFlags = (old.configureFlags or []) ++ [ "--yes" ];
+  });
+}
diff --git a/overlays/neomutt/default.nix b/overlays/neomutt/default.nix
new file mode 100644 (file)
index 0000000..c8578c9
--- /dev/null
@@ -0,0 +1,8 @@
+self: super: {
+  neomutt = super.neomutt.overrideAttrs (old:
+    {
+      buildInputs = old.buildInputs ++ [ self.gdbm ];
+      configureFlags = old.configureFlags ++ [ "--gdbm" ];
+    }
+  );
+}
diff --git a/overlays/nixops/default.nix b/overlays/nixops/default.nix
new file mode 100644 (file)
index 0000000..eb29ecd
--- /dev/null
@@ -0,0 +1,7 @@
+self: super: {
+  nixops = super.nixops.overrideAttrs (old: {
+    preConfigure = (old.preConfigure or "") + ''
+      sed -i -e "/'keyFile'/s/'path'/'string'/" nixops/backends/__init__.py
+      '';
+  });
+}
diff --git a/overlays/pass/default.nix b/overlays/pass/default.nix
new file mode 100644 (file)
index 0000000..df42cf1
--- /dev/null
@@ -0,0 +1,8 @@
+self: super: {
+  pass = (super.pass.withExtensions (exts: [ exts.pass-otp ])).overrideAttrs (old:
+    self.mylibs.fetchedGit ./pass.json // {
+      patches = old.patches ++ [ ./pass-fix-pass-init.patch ];
+    }
+  );
+
+}
similarity index 100%
rename from fetched/pass.json
rename to overlays/pass/pass.json
diff --git a/overlays/pelican/default.nix b/overlays/pelican/default.nix
new file mode 100644 (file)
index 0000000..5f60b8f
--- /dev/null
@@ -0,0 +1,6 @@
+self: super: {
+  pelican = with self.python3Packages;
+    pelican.overrideAttrs(old: self.mylibs.fetchedGithub ./pelican.json // {
+      propagatedBuildInputs = old.propagatedBuildInputs ++ [ pyyaml ];
+    });
+}
diff --git a/overlays/profanity/default.nix b/overlays/profanity/default.nix
new file mode 100644 (file)
index 0000000..33861f1
--- /dev/null
@@ -0,0 +1,9 @@
+self: super: {
+  profanity = (super.profanity.override {
+    notifySupport = true;
+    inherit (self) libnotify gpgme gdk_pixbuf;
+    python = self.python3;
+  }).overrideAttrs (old: rec {
+    configureFlags = old.configureFlags ++ [ "--enable-plugins" ];
+  });
+}
diff --git a/overlays/sc-im/default.nix b/overlays/sc-im/default.nix
new file mode 100644 (file)
index 0000000..f728655
--- /dev/null
@@ -0,0 +1,9 @@
+self: super: {
+  sc-im = super.sc-im.overrideAttrs (old: {
+    buildPhase = ''
+      cd src
+      sed -i Makefile -e 's@\...name.info@.local/state/$(name)info@'
+      cd ..
+      '' + old.buildPhase;
+  });
+}
diff --git a/overlays/slrn/default.nix b/overlays/slrn/default.nix
new file mode 100644 (file)
index 0000000..6caef55
--- /dev/null
@@ -0,0 +1,11 @@
+self: super: {
+  slrn = super.slrn.overrideAttrs (old: rec {
+    version = "1.0.3a";
+    name = "slrn-${version}";
+    src = self.fetchurl {
+      url = "http://www.jedsoft.org/releases/slrn/slrn-${version}.tar.bz2";
+      sha256 = "1b1d9iikr60w0vq86y9a0l4gjl0jxhdznlrdp3r405i097as9a1v";
+    };
+    configureFlags = old.configureFlags ++ [ "--with-slrnpull" ];
+  });
+}
diff --git a/overlays/taskwarrior/default.nix b/overlays/taskwarrior/default.nix
new file mode 100644 (file)
index 0000000..64ea690
--- /dev/null
@@ -0,0 +1,13 @@
+self: super:
+{
+  taskwarrior = super.taskwarrior.overrideAttrs (old: {
+    postInstall = ''${old.postInstall}
+      mkdir -p "$out/share/vim/vimfiles/ftdetect"
+      mkdir -p "$out/share/vim/vimfiles/syntax"
+      ln -s "../../../../share/doc/task/scripts/vim/ftdetect/task.vim" "$out/share/vim/vimfiles/ftdetect/"
+      ln -s "../../../../share/doc/task/scripts/vim/syntax/taskrc.vim" "$out/share/vim/vimfiles/syntax/"
+      ln -s "../../../../share/doc/task/scripts/vim/syntax/taskdata.vim" "$out/share/vim/vimfiles/syntax/"
+      ln -s "../../../../share/doc/task/scripts/vim/syntax/taskedit.vim" "$out/share/vim/vimfiles/syntax/"
+    '';
+  });
+}
diff --git a/overlays/vit/default.nix b/overlays/vit/default.nix
new file mode 100644 (file)
index 0000000..4624284
--- /dev/null
@@ -0,0 +1,8 @@
+self: super:
+{
+  vit = (super.vit.override { inherit (self) taskwarrior; }).overrideAttrs (old:
+    self.mylibs.fetchedGithub ./vit.json // {
+      buildInputs = old.buildInputs ++ (with self.perlPackages; [ TryTiny TextCharWidth ]);
+    }
+  );
+}
similarity index 100%
rename from fetched/vit.json
rename to overlays/vit/vit.json
diff --git a/overlays/weboob/default.nix b/overlays/weboob/default.nix
new file mode 100644 (file)
index 0000000..d0a15a7
--- /dev/null
@@ -0,0 +1,15 @@
+self: super: {
+  weboob = (self.pythonPackages.weboob.overridePythonAttrs {
+    setupPyBuildFlags = [ "--no-qt" "--xdg" ];
+  }).overrideAttrs (old: rec {
+    version = "1.5";
+    src = self.fetchurl {
+      url = "https://git.weboob.org/weboob/weboob/-/archive/${version}/${old.pname}-${version}.tar.gz";
+      sha256 = "0l6q5nm5g0zn6gmf809059kddrbds27wgygxsfkqja9blks5vq7z";
+    };
+    postInstall = ''${old.postInstall or ""}
+      mkdir -p $out/share/bash-completion/completions/
+      cp tools/weboob_bash_completion $out/share/bash-completion/completions/weboob
+    '';
+  });
+}
diff --git a/overlays/weechat/default.nix b/overlays/weechat/default.nix
new file mode 100644 (file)
index 0000000..07c6d89
--- /dev/null
@@ -0,0 +1,14 @@
+self: super: {
+  weechat = super.weechat.override {
+    configure = { availablePlugins, ... }: {
+      plugins = with self; with availablePlugins; [
+          # Make sure websocket_client is not 0.55.0, it provokes
+          # regular crashes
+         (python.withPackages (ps: with ps; [websocket_client emoji]))
+         perl
+         ruby
+        ];
+    };
+  };
+
+}