From a7430169e9196c3fb10479d15e595e8126d06a84 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sun, 19 Jan 2025 13:49:10 +0000 Subject: [PATCH] Refactor custom packages --- nix/pkgs/build-glove80.nix | 6 ++++-- nix/pkgs/i3-battery-popup.nix | 8 +++++--- nix/pkgs/notes.nix | 8 +++++--- nix/pkgs/tmux-sessionizer/default.nix | 8 +++++--- nix/pkgs/upload-to-files.nix | 4 +++- nix/pkgs/vim-plugins/conf-vim.nix | 6 ++++-- nix/pkgs/vim-plugins/default.nix | 1 - nix/pkgs/vim-plugins/edit-alternate-vim.nix | 6 ++++-- nix/pkgs/vim-plugins/nvim-tmux-navigation.nix | 6 ++++-- nix/pkgs/vim-plugins/standard-vim.nix | 6 ++++-- nix/pkgs/vim-plugins/vim-autoread.nix | 6 ++++-- nix/pkgs/vim-plugins/vim-caser.nix | 6 ++++-- nix/pkgs/vim-plugins/vim-heritage.nix | 6 ++++-- nix/pkgs/vim-plugins/vim-textobj-indent.nix | 6 ++++-- nix/pkgs/vim-plugins/vim-textobj-xmlattr.nix | 6 ++++-- nix/pkgs/vim-plugins/vim-zoom.nix | 11 ----------- 16 files changed, 58 insertions(+), 42 deletions(-) delete mode 100644 nix/pkgs/vim-plugins/vim-zoom.nix diff --git a/nix/pkgs/build-glove80.nix b/nix/pkgs/build-glove80.nix index 9c66874..c6feba0 100644 --- a/nix/pkgs/build-glove80.nix +++ b/nix/pkgs/build-glove80.nix @@ -1,9 +1,11 @@ { pkgs, ... }: -pkgs.writeShellApplication { +with pkgs; + +writeShellApplication { name = "build-glove80"; - runtimeInputs = with pkgs; [ + runtimeInputs = [ cachix git nix diff --git a/nix/pkgs/i3-battery-popup.nix b/nix/pkgs/i3-battery-popup.nix index 9cd1505..82de995 100644 --- a/nix/pkgs/i3-battery-popup.nix +++ b/nix/pkgs/i3-battery-popup.nix @@ -1,17 +1,19 @@ { pkgs, ... }: -pkgs.stdenv.mkDerivation rec { +with pkgs; + +stdenv.mkDerivation rec { pname = "i3-battery-popop"; version = "1.1.1"; - src = pkgs.fetchFromGitHub { + src = fetchFromGitHub { owner = "rjekker"; repo = "i3-battery-popup"; rev = "v${version}"; sha256 = "s6jZCkB0Z8dtnBG2p1NJIUY1fV4urEp4w6wFzxFNlqg="; }; - buildInputs = with pkgs; [ bash ]; + buildInputs = [ bash ]; installPhase = '' mkdir -p $out/bin diff --git a/nix/pkgs/notes.nix b/nix/pkgs/notes.nix index 1548982..712eb30 100644 --- a/nix/pkgs/notes.nix +++ b/nix/pkgs/notes.nix @@ -1,17 +1,19 @@ { pkgs, ... }: -pkgs.stdenv.mkDerivation rec { +with pkgs; + +stdenv.mkDerivation rec { pname = "notes"; version = "0.3.0"; - src = pkgs.fetchFromGitHub { + src = fetchFromGitHub { owner = "nickjj"; repo = "notes"; rev = "v${version}"; sha256 = "gyrsTWPT8w4DsRim3jlbjvpXwX/y+7SwLaM+3LVOJdU="; }; - buildInputs = with pkgs; [ bash ]; + buildInputs = [ bash ]; installPhase = '' mkdir -p $out/bin diff --git a/nix/pkgs/tmux-sessionizer/default.nix b/nix/pkgs/tmux-sessionizer/default.nix index 8e15b3f..21cd6de 100644 --- a/nix/pkgs/tmux-sessionizer/default.nix +++ b/nix/pkgs/tmux-sessionizer/default.nix @@ -1,17 +1,19 @@ { pkgs, ... }: -pkgs.stdenv.mkDerivation rec { +with pkgs; + +stdenv.mkDerivation { pname = "tmux-sessonizer"; version = "0.1.0"; - src = pkgs.fetchFromGitHub { + src = fetchFromGitHub { owner = "theprimeagen"; repo = "tmux-sessionizer"; rev = "master"; sha256 = "bZXt9TyMU1Ed/WR0/ahMQ4oyIi6yXLKnXKYPPNBt/s4="; }; - buildInputs = with pkgs; [ + buildInputs = [ bash fzf tmux diff --git a/nix/pkgs/upload-to-files.nix b/nix/pkgs/upload-to-files.nix index da0641b..ea6a680 100644 --- a/nix/pkgs/upload-to-files.nix +++ b/nix/pkgs/upload-to-files.nix @@ -1,6 +1,8 @@ { pkgs }: -pkgs.writeShellApplication { +with pkgs; + +writeShellApplication { name = "upload-to-files"; text = '' diff --git a/nix/pkgs/vim-plugins/conf-vim.nix b/nix/pkgs/vim-plugins/conf-vim.nix index 634e75c..086bbcf 100644 --- a/nix/pkgs/vim-plugins/conf-vim.nix +++ b/nix/pkgs/vim-plugins/conf-vim.nix @@ -1,8 +1,10 @@ { pkgs, ... }: -pkgs.vimUtils.buildVimPlugin { +with pkgs; + +vimUtils.buildVimPlugin { name = "conf-vim"; - src = pkgs.fetchFromGitHub { + src = fetchFromGitHub { owner = "tjdevries"; repo = "conf.vim"; rev = "master"; diff --git a/nix/pkgs/vim-plugins/default.nix b/nix/pkgs/vim-plugins/default.nix index 1b4c22d..9076f34 100644 --- a/nix/pkgs/vim-plugins/default.nix +++ b/nix/pkgs/vim-plugins/default.nix @@ -10,5 +10,4 @@ vim-heritage = callPackage ./vim-heritage.nix { }; vim-textobj-indent = callPackage ./vim-textobj-indent.nix { }; vim-textobj-xmlattr = callPackage ./vim-textobj-xmlattr.nix { }; - vim-zoom = callPackage ./vim-zoom.nix { }; } diff --git a/nix/pkgs/vim-plugins/edit-alternate-vim.nix b/nix/pkgs/vim-plugins/edit-alternate-vim.nix index dbfc287..daf42d4 100644 --- a/nix/pkgs/vim-plugins/edit-alternate-vim.nix +++ b/nix/pkgs/vim-plugins/edit-alternate-vim.nix @@ -1,8 +1,10 @@ { pkgs, ... }: -pkgs.vimUtils.buildVimPlugin { +with pkgs; + +vimUtils.buildVimPlugin { name = "edit-alternate-vim"; - src = pkgs.fetchFromGitHub { + src = fetchFromGitHub { owner = "tjdevries"; repo = "edit_alternate.vim"; rev = "master"; diff --git a/nix/pkgs/vim-plugins/nvim-tmux-navigation.nix b/nix/pkgs/vim-plugins/nvim-tmux-navigation.nix index 19835cb..3d2634e 100644 --- a/nix/pkgs/vim-plugins/nvim-tmux-navigation.nix +++ b/nix/pkgs/vim-plugins/nvim-tmux-navigation.nix @@ -1,8 +1,10 @@ { pkgs, ... }: -pkgs.vimUtils.buildVimPlugin { +with pkgs; + +vimUtils.buildVimPlugin { name = "nvim-tmux-navigation"; - src = pkgs.fetchFromGitHub { + src = fetchFromGitHub { owner = "alexghergh"; repo = "nvim-tmux-navigation"; rev = "4898c98702954439233fdaf764c39636681e2861"; diff --git a/nix/pkgs/vim-plugins/standard-vim.nix b/nix/pkgs/vim-plugins/standard-vim.nix index d53432c..9263a40 100644 --- a/nix/pkgs/vim-plugins/standard-vim.nix +++ b/nix/pkgs/vim-plugins/standard-vim.nix @@ -1,8 +1,10 @@ { pkgs, ... }: -pkgs.vimUtils.buildVimPlugin { +with pkgs; + +vimUtils.buildVimPlugin { name = "standard-vim"; - src = pkgs.fetchFromGitHub { + src = fetchFromGitHub { owner = "tjdevries"; repo = "standard.vim"; rev = "master"; diff --git a/nix/pkgs/vim-plugins/vim-autoread.nix b/nix/pkgs/vim-plugins/vim-autoread.nix index 37f95a0..e632a85 100644 --- a/nix/pkgs/vim-plugins/vim-autoread.nix +++ b/nix/pkgs/vim-plugins/vim-autoread.nix @@ -1,8 +1,10 @@ { pkgs, ... }: -pkgs.vimUtils.buildVimPlugin { +with pkgs; + +vimUtils.buildVimPlugin { name = "vim-autoread"; - src = pkgs.fetchFromGitHub { + src = fetchFromGitHub { owner = "djoshea"; repo = "vim-autoread"; rev = "24061f84652d768bfb85d222c88580b3af138dab"; diff --git a/nix/pkgs/vim-plugins/vim-caser.nix b/nix/pkgs/vim-plugins/vim-caser.nix index 512a065..7a47fe1 100644 --- a/nix/pkgs/vim-plugins/vim-caser.nix +++ b/nix/pkgs/vim-plugins/vim-caser.nix @@ -1,8 +1,10 @@ { pkgs, ... }: -pkgs.vimUtils.buildVimPlugin { +with pkgs; + +vimUtils.buildVimPlugin { name = "vim-caser"; - src = pkgs.fetchFromGitHub { + src = fetchFromGitHub { owner = "arthurxavierx"; repo = "vim-caser"; rev = "6bc9f41d170711c58e0157d882a5fe8c30f34bf6"; diff --git a/nix/pkgs/vim-plugins/vim-heritage.nix b/nix/pkgs/vim-plugins/vim-heritage.nix index 4c5f178..98483d9 100644 --- a/nix/pkgs/vim-plugins/vim-heritage.nix +++ b/nix/pkgs/vim-plugins/vim-heritage.nix @@ -1,8 +1,10 @@ { pkgs, ... }: -pkgs.vimUtils.buildVimPlugin { +with pkgs; + +vimUtils.buildVimPlugin { name = "vim-heritage"; - src = pkgs.fetchFromGitHub { + src = fetchFromGitHub { owner = "jessarcher"; repo = "vim-heritage"; rev = "cffa05c78c0991c998adc4504d761b3068547db6"; diff --git a/nix/pkgs/vim-plugins/vim-textobj-indent.nix b/nix/pkgs/vim-plugins/vim-textobj-indent.nix index d1dd549..733c562 100644 --- a/nix/pkgs/vim-plugins/vim-textobj-indent.nix +++ b/nix/pkgs/vim-plugins/vim-textobj-indent.nix @@ -1,8 +1,10 @@ { pkgs, ... }: -pkgs.vimUtils.buildVimPlugin { +with pkgs; + +vimUtils.buildVimPlugin { name = "vim-textobj-indent"; - src = pkgs.fetchFromGitHub { + src = fetchFromGitHub { owner = "kana"; repo = "vim-textobj-indent"; rev = "deb76867c302f933c8f21753806cbf2d8461b548"; diff --git a/nix/pkgs/vim-plugins/vim-textobj-xmlattr.nix b/nix/pkgs/vim-plugins/vim-textobj-xmlattr.nix index 94562d6..dddde8c 100644 --- a/nix/pkgs/vim-plugins/vim-textobj-xmlattr.nix +++ b/nix/pkgs/vim-plugins/vim-textobj-xmlattr.nix @@ -1,8 +1,10 @@ { pkgs, ... }: -pkgs.vimUtils.buildVimPlugin { +with pkgs; + +vimUtils.buildVimPlugin { name = "vim-textobj-xmlattr"; - src = pkgs.fetchFromGitHub { + src = fetchFromGitHub { owner = "whatyouhide"; repo = "vim-textobj-xmlattr"; rev = "694a297f1d75fd527e87da9769f3c6519a87ebb1"; diff --git a/nix/pkgs/vim-plugins/vim-zoom.nix b/nix/pkgs/vim-plugins/vim-zoom.nix deleted file mode 100644 index 1bc8596..0000000 --- a/nix/pkgs/vim-plugins/vim-zoom.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ pkgs, ... }: - -pkgs.vimUtils.buildVimPlugin { - name = "vim-zoom"; - src = pkgs.fetchFromGitHub { - owner = "dhruvasagar"; - repo = "vim-zoom"; - rev = "01c737005312c09e0449d6518decf8cedfee32c7"; - sha256 = "/ADzScsG0u6RJbEtfO23Gup2NYdhPkExqqOPVcQa7aQ="; - }; -}