diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c834a98..ae3d519 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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' diff --git a/overlay.nix b/overlay.nix index 1e77930..9958614 100644 --- a/overlay.nix +++ b/overlay.nix @@ -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}" - ''; - } - ); } diff --git a/packages.nix b/packages.nix index fd82973..b3df22d 100644 --- a/packages.nix +++ b/packages.nix @@ -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; }; diff --git a/packages/fennel-luajit.nix b/packages/fennel-luajit.nix new file mode 100644 index 0000000..c1fab2a --- /dev/null +++ b/packages/fennel-luajit.nix @@ -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}" + ''; + } +)