1
0
Fork 0

Make fennel-luajit a proper package

This commit is contained in:
Daniel Kempkens 2022-08-06 17:26:50 +02:00
parent 2eb53b0aad
commit 0a2fdff685
4 changed files with 23 additions and 17 deletions

View file

@ -19,6 +19,7 @@ jobs:
with:
name: nifoc
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix build '.#fennel-luajit'
- run: nix build '.#proximity-sort'
- run: nix build '.#q'
@ -34,6 +35,7 @@ jobs:
name: nifoc
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix build '.#cliclick'
- run: nix build '.#fennel-luajit'
- run: nix build '.#phantomjs'
- run: nix build '.#proximity-sort'
- run: nix build '.#q'

View file

@ -1,26 +1,13 @@
_: super:
let custom = super.callPackage ./packages.nix { }; in
let
custom = super.callPackage ./packages.nix { };
in
{
inherit (custom) agilebits-op;
inherit (custom) cliclick;
inherit (custom) fennel-luajit;
inherit (custom) phantomjs;
inherit (custom) proximity-sort;
inherit (custom) q;
fennel-luajit = super.fennel.overrideAttrs (
let
luaPackages = with super.luajitPackages; [ readline ];
in
o: rec {
buildInputs = [ super.luajit super.makeWrapper ] ++ luaPackages;
postInstall = o.postInstall or "" + ''
wrapProgram $out/bin/fennel \
--suffix LUA_CPATH ";" "${super.lib.concatMapStringsSep ";" super.luajitPackages.getLuaCPath luaPackages}" \
--suffix LUA_PATH ";" "${super.lib.concatMapStringsSep ";" super.luajitPackages.getLuaPath luaPackages}"
'';
}
);
}

View file

@ -3,6 +3,7 @@
{
agilebits-op = import ./packages/agilebits-op.nix { inherit system lib pkgs; };
cliclick = import ./packages/cliclick.nix { inherit system lib pkgs; };
fennel-luajit = import ./packages/fennel-luajit.nix { inherit system lib pkgs; };
phantomjs = import ./packages/phantomjs.nix { inherit system lib pkgs; };
proximity-sort = import ./packages/proximity-sort.nix { inherit system lib pkgs; };
q = import ./packages/q.nix { inherit system lib pkgs; };

View file

@ -0,0 +1,16 @@
{ system, lib, pkgs }:
pkgs.fennel.overrideAttrs (
let
luaPackages = with pkgs.luajitPackages; [ readline ];
in
o: rec {
buildInputs = [ pkgs.luajit pkgs.makeWrapper ] ++ luaPackages;
postInstall = o.postInstall or "" + ''
wrapProgram $out/bin/fennel \
--suffix LUA_CPATH ";" "${lib.concatMapStringsSep ";" pkgs.luajitPackages.getLuaCPath luaPackages}" \
--suffix LUA_PATH ";" "${lib.concatMapStringsSep ";" pkgs.luajitPackages.getLuaPath luaPackages}"
'';
}
)