add nix-alien autopatchelfhook and fix paste script

This commit is contained in:
sadan 2024-12-19 00:53:10 -05:00
parent 48057370fb
commit cb9eccce25
No known key found for this signature in database
5 changed files with 216 additions and 72 deletions

View file

@ -1,8 +1,19 @@
{pkgs, lib, inputs, ...}:
let
# cpkg = import ../../../../customPackages { inherit pkgs inputs; };
# https://discourse.nixos.org/t/how-to-create-a-script-with-dependencies/7970/6
mkScript = { name, version ? "0.0.1", file, env ? [ ] }:
{
pkgs,
lib,
inputs,
...
}:
let
# cpkg = import ../../../../customPackages { inherit pkgs inputs; };
# https://discourse.nixos.org/t/how-to-create-a-script-with-dependencies/7970/6
mkScript =
{
name,
version ? "0.0.1",
file,
env ? [ ],
}:
pkgs.writeTextFile {
name = "${name}-${version}";
executable = true;
@ -15,56 +26,64 @@ mkScript = { name, version ? "0.0.1", file, env ? [ ] }:
exec ${pkgs.bash}/bin/bash ${file} $@
'';
};
in
in
{
imports = [
../../../../customPackages
imports = [
../../../../customPackages
];
home = {
packages = [
# env for clipboard command will be required by their respective environemnts
(mkScript {
name = "paste";
file = ./paste.sh;
})
(mkScript {
name = "copy";
file = ./copy.sh;
})
(mkScript {
name = "http2ssh";
file = ./http2ssh.sh;
env = [ pkgs.git ];
})
(mkScript {
name = "git_fetchAll";
file = ./git_fetchAll.sh;
env = [ pkgs.git ];
})
(mkScript {
name = "install_eslint";
file = ./install_eslint.sh;
})
(mkScript {
name = "math";
file = ./math.sh;
env = [ pkgs.python3 ];
})
(mkScript {
name = "hashi18n";
file = ./hashi18n.sh;
})
(mkScript {
name = "flakeify";
file = ./flakeify.sh;
env = [ pkgs.direnv ];
})
];
home = {
packages = [
# env for clipboard command will be required by their respective environemnts
(mkScript {
name = "paste";
file = ./paste.sh;
})
(mkScript {
name = "copy";
file = ./copy.sh;
})
(mkScript {
name = "http2ssh";
file = ./http2ssh.sh;
env = [pkgs.git];
})
(mkScript {
name = "git_fetchAll";
file = ./git_fetchAll.sh;
env = [pkgs.git];
})
(mkScript {
name = "install_eslint";
file = ./install_eslint.sh;
})
(mkScript {
name = "math";
file = ./math.sh;
env = [pkgs.python3];
})
(mkScript {
name = "hashi18n";
file = ./hashi18n.sh;
})
(mkScript {
name = "flakeify";
file = ./flakeify.sh;
env = [pkgs.direnv];
})
];
file = {
scripts = {
source = "${pkgs.cpkg.scripts}";
target = ".scripts";
};
};
file = {
scripts = {
source = "${pkgs.cpkg.scripts}";
target = ".scripts";
};
};
shellAliases = {
paste = "${
(mkScript {
name = "paste";
file = ./paste.sh;
})
}/bin/paste";
};
};
}