diff options
| author | lassulus <git@lassul.us> | 2026-01-11 01:29:31 +0100 |
|---|---|---|
| committer | lassulus <git@lassul.us> | 2026-01-11 01:29:31 +0100 |
| commit | 68d3c925b0edb958fcbafa589d35967dfb2a979c (patch) | |
| tree | 82018f93e411fcad47cb45867c646ce0f8feb683 /krebs/5pkgs/simple/brain | |
| parent | 39ef2da7d30dba7c5c1556ffa90d330a9607bb44 (diff) | |
5pkgs: fix nix flake show compatibility
Integrate nix-writers flake for extended writer functions (writeJq,
writeGawkBin, etc.) using a fixpoint overlay so functions can reference
each other.
Update Python packages to new buildPythonPackage format:
- Add pyproject = true and build-system for ovh-zone, python-dnsstamps,
ssh-audit, tinc_graphs
Fix writer function usage by taking them as arguments instead of
accessing via pkgs:
- nixos-format-error, untilport, qrscan, logf, gitignore, urix, etc.
Update deprecated nixpkgs attribute names:
- gdk_pixbuf -> gdk-pixbuf
- libSM/libX11/libXinerama -> xorg.*
- buildGo120Module -> buildGoModule
Remove obsolete/broken packages:
- buildbot-classic-slave (missing buildbot-classic)
- cac-panel, drivedroid-gen-repo (Python 2 / format issues)
- games-user-env, generate-secrets (unused)
- internetarchive, bepasty-client-cli, krebspaste (Python 2)
- qrscan (conflicts with removed nixpkgs package)
Other fixes:
- Use lib.callPackageWith for package interdependencies
- Only export derivations in flake packages output
- Limit packages output to Linux systems
- Fix IFD in ukrepl by passing path to writer instead of readFile
- Import stockholm.lib directly where needed (bling)
- Rewrite brain and git-hooks to use runCommand
Diffstat (limited to 'krebs/5pkgs/simple/brain')
| -rw-r--r-- | krebs/5pkgs/simple/brain/default.nix | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/krebs/5pkgs/simple/brain/default.nix b/krebs/5pkgs/simple/brain/default.nix index d7e36a527..9f183cfe9 100644 --- a/krebs/5pkgs/simple/brain/default.nix +++ b/krebs/5pkgs/simple/brain/default.nix @@ -4,25 +4,30 @@ let pass = pkgs.pass.withExtensions (ext: [ ext.pass-otp ]); -in -pkgs.write "brain" { - "/bin/brain".link = pkgs.writeDash "brain" '' + brain = pkgs.writeDash "brain" '' PASSWORD_STORE_DIR=$HOME/brain \ exec ${pass}/bin/pass "$@" ''; - "/bin/brainmenu".link = pkgs.writeDash "brainmenu" '' + + brainmenu = pkgs.writeDash "brainmenu" '' PASSWORD_STORE_DIR=$HOME/brain \ exec ${pass}/bin/passmenu "$@" ''; - "/share/bash-completion/completions/brain".link = - pkgs.runCommand "brain-completions" { - } /* sh */ '' - sed -r ' - s/\<_pass?(_|\>)/_brain\1/g - s/\<__password_store/_brain/g - s/\<pass\>/brain/ - s/\$HOME\/\.password-store/$HOME\/brain/ - ' < ${pass}/share/bash-completion/completions/pass > $out - ''; -} + + completions = pkgs.runCommand "brain-completions" {} '' + sed -r ' + s/\<_pass?(_|\>)/_brain\1/g + s/\<__password_store/_brain/g + s/\<pass\>/brain/ + s/\$HOME\/\.password-store/$HOME\/brain/ + ' < ${pass}/share/bash-completion/completions/pass > $out + ''; +in + +pkgs.runCommand "brain" {} '' + mkdir -p $out/bin $out/share/bash-completion/completions + ln -s ${brain} $out/bin/brain + ln -s ${brainmenu} $out/bin/brainmenu + ln -s ${completions} $out/share/bash-completion/completions/brain +'' |
