summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs/simple
diff options
context:
space:
mode:
Diffstat (limited to 'krebs/5pkgs/simple')
-rw-r--r--krebs/5pkgs/simple/brain/default.nix20
-rw-r--r--krebs/5pkgs/simple/cabal-read.nix39
2 files changed, 13 insertions, 46 deletions
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)
- '';
- };
-}