Clean up nix-container-demo-helper.sh
[?]
Mar 23, 2023, 9:15 PM
4A2DSMIMTZQWWZU76RCPYE2HYIGDBHQNZPRSJMQ4Y6T3CTFUZTEQCDependencies
- [2]
W2G433QURefactor libdemo and flakeref for nix run commands
Change contents
- replacement in bash/nix-container-demo-helper.sh at line 12
if type nix >/dev/null; then# Hack around missing mainProgram attribute in pygments# TODO: use nixpkgs_flakeref when this fix is mergedCOLORTERM="" TERM="" nix run github:sfrijters/nixpkgs/pygments-mainprogram#python3Packages.pygments -- "$@"elif type pygmentize >/dev/null; thenCOLORTERM="" TERM="" pygmentize "$@"elseecho "pygmentize command not found"return 1fi# Hack around missing mainProgram attribute in pygments# TODO: use nixpkgs_flakeref when this fix is mergedCOLORTERM="" TERM="" nix run github:sfrijters/nixpkgs/pygments-mainprogram#python3Packages.pygments -- "$@" - replacement in bash/nix-container-demo-helper.sh at line 25
if type nix > /dev/null; then# Hack around missing imagemagick# TODO: use nixpkgs_flakeref when this fix is mergednix run github:sfrijters/nixpkgs/tiv-add-wrapper#tiv -- "$@"elif type tiv >/dev/null; thentiv "$@"elseecho "tiv command not found"return 1fi# Hack around missing imagemagick# TODO: use nixpkgs_flakeref when this fix is mergednix run github:sfrijters/nixpkgs/tiv-add-wrapper#tiv -- "$@" - replacement in bash/nix-container-demo-helper.sh at line 34
if type nix > /dev/null; thennix run "${NIXPKGS_FLAKEREF}#file" -- "$@"elif type file >/dev/null; thenfile "$@"elseecho "file command not found"return 1finix run "${NIXPKGS_FLAKEREF}#file" -- "$@"