diff options
Diffstat (limited to 'krebs/5pkgs')
-rw-r--r-- | krebs/5pkgs/haskell/hack.nix | 21 | ||||
-rw-r--r-- | krebs/5pkgs/simple/brain/default.nix | 20 | ||||
-rw-r--r-- | krebs/5pkgs/simple/cabal-read.nix | 39 |
3 files changed, 13 insertions, 67 deletions
diff --git a/krebs/5pkgs/haskell/hack.nix b/krebs/5pkgs/haskell/hack.nix deleted file mode 100644 index df3343818..000000000 --- a/krebs/5pkgs/haskell/hack.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ mkDerivation, base, blessings, containers, data-default, fetchgit -, lens, lib, mtl, old-locale, process, scanner, time, unix, zippers -}: -mkDerivation { - pname = "hack"; - version = "1.0.1"; - src = fetchgit { - url = "https://cgit.krebsco.de/hack"; - sha256 = "0ry5ikn89ij512qvk1xhdhfz4s8a6b9yawgx6lxgnw5jkiyjd7ka"; - rev = "f3ea150aca5cc86878fa10bc5b1f0918fc154e2a"; - fetchSubmodules = true; - }; - isLibrary = true; - isExecutable = true; - libraryHaskellDepends = [ base ]; - executableHaskellDepends = [ - base blessings containers data-default lens mtl old-locale process - scanner time unix zippers - ]; - license = lib.licenses.mit; -} diff --git a/krebs/5pkgs/simple/brain/default.nix b/krebs/5pkgs/simple/brain/default.nix index bf52da75f..d7e36a527 100644 --- a/krebs/5pkgs/simple/brain/default.nix +++ b/krebs/5pkgs/simple/brain/default.nix @@ -1,16 +1,22 @@ -{ pass, runCommand, write, writeDash, ... }: +{ pkgs }: -write "brain" { - "/bin/brain".link = writeDash "brain" '' +let + pass = pkgs.pass.withExtensions (ext: [ + ext.pass-otp + ]); +in + +pkgs.write "brain" { + "/bin/brain".link = pkgs.writeDash "brain" '' PASSWORD_STORE_DIR=$HOME/brain \ - exec ${pass}/bin/pass $@ + exec ${pass}/bin/pass "$@" ''; - "/bin/brainmenu".link = writeDash "brainmenu" '' + "/bin/brainmenu".link = pkgs.writeDash "brainmenu" '' PASSWORD_STORE_DIR=$HOME/brain \ - exec ${pass}/bin/passmenu $@ + exec ${pass}/bin/passmenu "$@" ''; "/share/bash-completion/completions/brain".link = - runCommand "brain-completions" { + pkgs.runCommand "brain-completions" { } /* sh */ '' sed -r ' s/\<_pass?(_|\>)/_brain\1/g diff --git a/krebs/5pkgs/simple/cabal-read.nix b/krebs/5pkgs/simple/cabal-read.nix deleted file mode 100644 index 03b42ef2c..000000000 --- a/krebs/5pkgs/simple/cabal-read.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ writeHaskellPackage }: - -# Because `sed -n 's/.*\<ghc-options:\s\+\(.*\)/\1/p'` is too simple. -writeHaskellPackage "cabal-read" { - executables.ghc-options = { - extra-depends = ["Cabal"]; - text = /* haskell */ '' - {-# LANGUAGE CPP #-} - module Main (main) where - import Data.List - import Data.Maybe - import Distribution.Compiler - import Distribution.PackageDescription.Parsec - import Distribution.Types.BuildInfo - import Distribution.Types.CondTree - import Distribution.Types.Executable - import Distribution.Types.GenericPackageDescription - import Distribution.Types.UnqualComponentName - import Distribution.Verbosity - import System.Environment - main :: IO () - main = do - [path, name] <- getArgs - - desc <- readGenericPackageDescription normal path - - case lookup (mkUnqualComponentName name) (condExecutables desc) of - Just exe -> - putStrLn . intercalate " " . fromMaybe [] . lookup GHC - #if MIN_VERSION_Cabal(3,0,0) - . perCompilerFlavorToList - #endif - . options . buildInfo . condTreeData $ exe - - Nothing -> - error ("executable " <> name <> " not found in " <> path) - ''; - }; -} |