From 73e005472473646a820a7d5528e2e6fcbd870dee Mon Sep 17 00:00:00 2001 From: Martin Potier Date: Fri, 8 Oct 2021 15:59:27 +0300 Subject: [PATCH] Add flakes support --- flake.lock | 25 +++++++++++++++++++++++++ flake.nix | 9 +++++++++ pkgs/default.nix | 46 +++++++++++++++++++++++----------------------- 3 files changed, 57 insertions(+), 23 deletions(-) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..bd9d2c7 --- /dev/null +++ b/flake.lock @@ -0,0 +1,25 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1633695537, + "narHash": "sha256-mZXHU2Ue0wHyxL4l+22BtcPpFlGUtYLZK7o7fP39yfc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b27d18a412b071f5d7991d1648cfe78ee7afe68a", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..39b4d6f --- /dev/null +++ b/flake.nix @@ -0,0 +1,9 @@ +{ + description = "My overlays"; + + outputs = { self, nixpkgs }: { + + overlay = import ./pkgs; + + }; +} diff --git a/pkgs/default.nix b/pkgs/default.nix index 84cc264..d2a617b 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,9 +1,9 @@ # This overlay provides a set of customized pkgs. -self: super: +final: prev: { - iosevka-hskl = super.iosevka.override { + iosevka-hskl = prev.iosevka.override { privateBuildPlan = '' [buildPlans.iosevka-samae] family = "Iosevka Samae" @@ -53,49 +53,49 @@ self: super: set = "samae"; }; - wineNoGS = super.wineStaging.override { gstreamerSupport = false; }; + wineNoGS = prev.wineStaging.override { gstreamerSupport = false; }; - surge-samae = super.callPackage ./surge {}; + surge-samae = prev.callPackage ./surge {}; - carla-samae = super.qt5.callPackage ./carla {}; + carla-samae = prev.qt5.callPackage ./carla {}; - vim-samae = super.callPackage ./vim {}; + vim-samae = prev.callPackage ./vim {}; - patchmatrix-samae = super.callPackage ./patchmatrix {}; + patchmatrix-samae = prev.callPackage ./patchmatrix {}; - reaper-samae = super.callPackage ./reaper {}; + reaper-samae = prev.callPackage ./reaper {}; - mopidy-mpd-samae = super.callPackage ./mopidy-mpd {}; + mopidy-mpd-samae = prev.callPackage ./mopidy-mpd {}; - vcv-rack-samae = super.callPackage ./vcv-rack {}; + vcv-rack-samae = prev.callPackage ./vcv-rack {}; - scientifica-font = super.callPackage ./scientifica-font {}; - curie-font = super.callPackage ./curie-font {}; - victor-mono = super.callPackage ./victor-mono {}; + scientifica-font = prev.callPackage ./scientifica-font {}; + curie-font = prev.callPackage ./curie-font {}; + victor-mono = prev.callPackage ./victor-mono {}; - ripmime = super.ripmime.override { - stdenv = super.overrideCC super.stdenv super.gcc6; + ripmime = prev.ripmime.override { + stdenv = prev.overrideCC prev.stdenv prev.gcc6; }; - squeezer = super.callPackage ./squeezer {}; + squeezer = prev.callPackage ./squeezer {}; - decentsampler = super.callPackage ./decentsampler {}; + decentsampler = prev.callPackage ./decentsampler {}; # Originally from Mats Rauhala ®2018 - copy = super.writeScriptBin "copy" '' + copy = prev.writeScriptBin "copy" '' function clean() { sleep 10 - ${super.libnotify}/bin/notify-send -u low 'Clipboard cleaned' - ${super.xclip}/bin/xclip -sel clipboard -i /dev/null + ${prev.libnotify}/bin/notify-send -u low 'Clipboard cleaned' + ${prev.xclip}/bin/xclip -sel clipboard -i /dev/null } - ${super.xclip}/bin/xclip -sel clipboard < /dev/stdin - ${super.libnotify}/bin/notify-send -u low -t 10000 'Clipboard set' + ${prev.xclip}/bin/xclip -sel clipboard < /dev/stdin + ${prev.libnotify}/bin/notify-send -u low -t 10000 'Clipboard set' clean & ''; - myAt = super.writeScriptBin "at" '' + myAt = prev.writeScriptBin "at" '' echo "Running cmd in $(( $(date -d "$1" +%s) - $(date +%s) )) seconds" sleep $(( $(date -d "$1" +%s) - $(date +%s) )) shift 1