nom: basic raku packaging builder

wip/nixpkgs-raku
Katharina Fey 3 years ago
parent 25af422940
commit 053409217b
Signed by: kookie
GPG Key ID: F972AEEA2887D547
  1. 1
      .gitignore
  2. 37
      infra/nom/default.nix
  3. 6
      infra/nom/lib/Test.rakumod

1
.gitignore vendored

@ -0,0 +1 @@
result

@ -0,0 +1,37 @@
with import <nixpkgs> {};
let
mkRakuPackage = { name
, version
, src
, buildInputs ? []
, nativeBuildInputs ? []
}: stdenv.mkDerivation {
pname = name;
inherit src version;
nativeBuildInputs = [ pkgs.makeWrapper ] ++ nativeBuildInputs;
buildInputs = with pkgs; [ rakudo ] ++ buildInputs;
# Raku programs are just-in-time compiled
dontBuild = true;
installPhase = ''
mkdir -p $out
cp -r bin/ $out/
for bin in $out/bin/*; do
wrapProgram $bin --set RAKULIB $out/lib
done
cp -r lib/ $out/
'';
};
in
mkRakuPackage {
name = "nom";
version = "0.1.0";
src = ./.;
}

@ -0,0 +1,6 @@
unit module Test;
our sub hello () is export {
say 'Calling a test function';
}
Loading…
Cancel
Save