about summary refs log tree commit diff
path: root/packages
diff options
context:
space:
mode:
authorBaitinq <manuelpalenzuelamerino@gmail.com>2022-06-17 19:09:27 +0200
committerBaitinq <manuelpalenzuelamerino@gmail.com>2022-06-17 19:09:27 +0200
commitad58b57df7b298bc3e25c578f590d44da3ce36c9 (patch)
tree28be43da790fa014e13a7284e5a5979537a8721a /packages
downloadnixos-config-ad58b57df7b298bc3e25c578f590d44da3ce36c9.tar.gz
nixos-config-ad58b57df7b298bc3e25c578f590d44da3ce36c9.tar.bz2
nixos-config-ad58b57df7b298bc3e25c578f590d44da3ce36c9.zip
Initial commit
Diffstat (limited to 'packages')
-rw-r--r--packages/adl/default.nix19
-rw-r--r--packages/anime-dl/default.nix41
-rw-r--r--packages/default.nix8
-rw-r--r--packages/dwmbar/default.nix21
-rw-r--r--packages/smart-wallpaper/default.nix19
-rw-r--r--packages/xwinwrap/default.nix51
6 files changed, 159 insertions, 0 deletions
diff --git a/packages/adl/default.nix b/packages/adl/default.nix
new file mode 100644
index 0000000..4ec7ac4
--- /dev/null
+++ b/packages/adl/default.nix
@@ -0,0 +1,19 @@
+{ stdenv, lib, fetchFromGitHub, makeWrapper, bash, anime-dl, trackma, mpv, fzf }:
+stdenv.mkDerivation {
+  pname = "adl";
+  version = "1.0";
+  src = fetchFromGitHub {
+    owner = "RaitaroH";
+    repo = "adl";
+    rev = "65f68e1dcae4c0caa52668d3a854269e7d226f7c";
+    sha256 = "sha256-fRK3N+UnBPXpvx4Z64JC5TstUi//x5jtrm+rFDxIQUs=";
+  };
+  buildInputs = [ bash anime-dl trackma mpv fzf ];
+  nativeBuildInputs = [ makeWrapper ];
+  installPhase = ''
+    mkdir -p $out/bin
+    cp adl $out/bin/adl  
+    wrapProgram $out/bin/adl \
+      --prefix PATH : ${lib.makeBinPath [ bash anime-dl trackma mpv fzf ]}
+  '';
+}
diff --git a/packages/anime-dl/default.nix b/packages/anime-dl/default.nix
new file mode 100644
index 0000000..164eeb8
--- /dev/null
+++ b/packages/anime-dl/default.nix
@@ -0,0 +1,41 @@
+{ pkgs
+, lib
+, fetchFromGitHub
+, python3Packages
+, python3
+, extraPkgs ? pkgs: [ ]
+}:
+python3Packages.buildPythonApplication rec {
+  pname = "anime-dl";
+  version = "5.0.14";
+  src = fetchFromGitHub {
+    owner = "anime-dl";
+    repo = "anime-downloader";
+    rev = version;
+    sha256 = "1ai71g8cp2i37p53lm32nl3h8cq7rcxifhnj1z1cfvxbqjvackaj";
+  };
+
+  propagatedBuildInputs = with python3.pkgs; [
+    pySmartDL
+    cfscrape
+    beautifulsoup4
+    requests
+    requests-cache
+    click
+    fuzzywuzzy
+    coloredlogs
+    tabulate
+    pycryptodome
+  ] ++ extraPkgs pkgs;
+
+  doCheck = false;
+
+  meta = with lib; {
+    homepage = "https://github.com/anime-dl/anime-downloader";
+    description = "A simple but powerful anime downloader and streamer.";
+    license = licenses.unlicense;
+    maintainers = [ ];
+    platforms = platforms.linux;
+  };
+}
+
diff --git a/packages/default.nix b/packages/default.nix
new file mode 100644
index 0000000..b1b0b67
--- /dev/null
+++ b/packages/default.nix
@@ -0,0 +1,8 @@
+final: prev:
+{
+  custom.smart-wallpaper = prev.callPackage ./smart-wallpaper { };
+  custom.dwmbar = prev.callPackage ./dwmbar { };
+  custom.xwinwrapr = prev.callPackage ./xwinwrap { };
+  custom.anime-dl = prev.callPackage ./anime-dl { };
+  custom.adl = prev.callPackage ./adl { };
+}
diff --git a/packages/dwmbar/default.nix b/packages/dwmbar/default.nix
new file mode 100644
index 0000000..340daf1
--- /dev/null
+++ b/packages/dwmbar/default.nix
@@ -0,0 +1,21 @@
+{ stdenv, lib, fetchFromGitHub, bash }:
+stdenv.mkDerivation {
+  pname = "dwmbar";
+  version = "1.0";
+  src = fetchFromGitHub {
+    owner = "thytom";
+    repo = "dwmbar";
+    rev = "574f5703c558a56bc9c354471543511255423dc7";
+    sha256 = "sha256-IrelZpgsxq2dnsjMdh7VC5eKffEGRbDkZmZBD+tROPs=";
+  };
+  patches = [ ../../patches/dwmbar.patch ];
+  buildInputs = [ bash ];
+  installPhase = ''
+    mkdir -p $out/bin
+    mkdir -p $out/bin/_dwmbar/modules
+    cp -r modules $out/bin/_dwmbar/
+    install config $out/bin/_dwmbar/config
+    install bar.sh $out/bin/_dwmbar/bar.sh
+    install dwmbar $out/bin/dwmbar
+  '';
+}
diff --git a/packages/smart-wallpaper/default.nix b/packages/smart-wallpaper/default.nix
new file mode 100644
index 0000000..020481c
--- /dev/null
+++ b/packages/smart-wallpaper/default.nix
@@ -0,0 +1,19 @@
+{ stdenv, lib, fetchFromGitHub, makeWrapper, bash, xdpyinfo, killall }:
+stdenv.mkDerivation {
+  pname = "smart-wallpaper";
+  version = "1.0";
+  src = fetchFromGitHub {
+    owner = "Baitinq";
+    repo = "smart-wallpaper";
+    rev = "154acddeb4b63c19beacc6a68248dd02797d9cca";
+    sha256 = "sha256-fRK3N+UnBPXpvx4Z64JC5TstUi//l5jtrm+rFDxIQUs=";
+  };
+  buildInputs = [ bash xdpyinfo killall ];
+  nativeBuildInputs = [ makeWrapper ];
+  installPhase = ''
+    mkdir -p $out/bin
+    cp smart-wallpaper $out/bin/smart-wallpaper  
+    wrapProgram $out/bin/smart-wallpaper \
+      --prefix PATH : ${lib.makeBinPath [ bash xdpyinfo killall ]}
+  '';
+}
diff --git a/packages/xwinwrap/default.nix b/packages/xwinwrap/default.nix
new file mode 100644
index 0000000..f3db34d
--- /dev/null
+++ b/packages/xwinwrap/default.nix
@@ -0,0 +1,51 @@
+{ lib, stdenv, fetchFromGitHub, xlibsWrapper }:
+
+stdenv.mkDerivation rec {
+  pname = "xwinwrap";
+  version = "4";
+
+  src = fetchFromGitHub {
+    owner = "Baitinq";
+    repo = "xwinwrap";
+    rev = "401b5a5eb092173443253cdd57736cd6bf401e40";
+    sha256 = "sha256-8+asreFjzD49O3sZlAXBsWD3PU0rqkbs/J3Dq9VeiYA=";
+  };
+
+  buildInputs = [ xlibsWrapper ];
+
+  buildPhase =
+    if stdenv.hostPlatform.system == "x86_64-linux" then ''
+      make all
+    '' else if stdenv.hostPlatform.system == "i686-linux" then ''
+      make all
+    '' else
+      throw "xwinwrap is not supported on ${stdenv.hostPlatform.system}";
+
+  installPhase = ''
+    mkdir -p $out/bin
+    mv xwinwrap $out/bin
+  '';
+
+  meta = with lib; {
+    description =
+      "A utility that allows you to use an animated X window as the wallpaper";
+    longDescription = ''
+      XWinWrap is a small utility written a loooong time ago that allowed you to
+      stick most of the apps to your desktop background. What this meant was you
+      could use an animated screensaver (like glmatrix, electric sheep, etc) or
+      even a movie, and use it as your wallpaper. But only one version of this
+      app was ever released, and it had a few problems, like:
+      - Well, sticking didn’t work. So if you did a “minimize all” or “go to
+      desktop” kind of thing, your “wallpaper” got minimized as well.
+      - The geometry option didn’t work, so you could not create, e.g., a small
+      matrix window surrounded by your original wallpaper.
+      Seeing no-one picking it up, I decided to give it a bit of polish last
+      weekend by fixing the above problems and also add a few features. And here
+      it is, in its new avatar “Shantz XWinWrap”.
+    '';
+    license = licenses.hpnd;
+    homepage = "https://shantanugoel.com/2008/09/03/shantz-xwinwrap/";
+    maintainers = with maintainers; [ infinisil ];
+    platforms = platforms.linux;
+  };
+}