Change-Id: Iebec5caea9b780eb8ca2ec1f18bb4fa978f4bb95 Reviewed-on: https://cl.tvl.fyi/c/depot/+/13107 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI Autosubmit: sterni <sternenseemann@systemli.org>
40 lines
922 B
Nix
40 lines
922 B
Nix
{ depot, pkgs, lib, ... }:
|
|
|
|
let
|
|
# update README.md when changing this
|
|
runtimeDependencies = [
|
|
depot.users.sterni.mn2html
|
|
pkgs.mblaze
|
|
pkgs.execline # execline-cd, importas
|
|
# coreutils # for printf (assumed to be installed)
|
|
];
|
|
|
|
# … and this
|
|
buildInputs = [
|
|
pkgs.cbqn
|
|
];
|
|
|
|
BQN_LIBS = depot.third_party.bqn-libs + "/lib";
|
|
in
|
|
|
|
pkgs.runCommandNoCC "blerg"
|
|
{
|
|
src = builtins.path {
|
|
name = "blerg.bqn";
|
|
path = ./. + "/blërg.bqn";
|
|
};
|
|
nativeBuildInputs = [ pkgs.buildPackages.makeWrapper ];
|
|
inherit buildInputs;
|
|
passthru.shell = pkgs.mkShell {
|
|
name = "blërg-shell";
|
|
packages = runtimeDependencies ++ buildInputs;
|
|
inherit BQN_LIBS;
|
|
};
|
|
}
|
|
''
|
|
install -Dm755 "$src" "$out/bin/blërg"
|
|
patchShebangs "$out/bin/blërg"
|
|
wrapProgram "$out/bin/blërg" \
|
|
--prefix PATH : "${lib.makeBinPath runtimeDependencies}" \
|
|
--set BQN_LIBS "${BQN_LIBS}"
|
|
''
|