Skip to content

Instantly share code, notes, and snippets.

@oscarduignan
Last active October 12, 2017 16:34
Show Gist options
  • Select an option

  • Save oscarduignan/821a0201e416144b11e8b4653a8afbd4 to your computer and use it in GitHub Desktop.

Select an option

Save oscarduignan/821a0201e416144b11e8b4653a8afbd4 to your computer and use it in GitHub Desktop.
nixos package and an overlay that uses it to install commandbox (command line tool for the lucee cfml programming language)
self: super: {
commandbox = super.callPackage /path/to/commandbox_package {};
}
{ stdenv, fetchurl, unzip, makeWrapper, jre }:
stdenv.mkDerivation rec {
name = "commandbox-3.8.0";
phases = ["unpackPhase" "patchPhase" "installPhase"];
src = fetchurl {
name = "${name}.zip";
url = "https://www.ortussolutions.com/parent/download/commandbox/type/bin"; # will break when there's a new release...
sha256 = "e184e380713b6e4e94c1266bf4abc352da2e5c7b19bdb9d5ce5f36665d1c58ec";
};
sourceRoot = "./";
buildInputs = [ makeWrapper unzip ];
installPhase = ''
mkdir -p $out/bin
cp ./box $out/bin
wrapProgram $out/bin/box --prefix PATH ":" ${jre}/bin ;
'';
}
@oscarduignan

oscarduignan commented Oct 12, 2017 •

Copy link
Copy Markdown
Author

To install this I put the overlay at ~/.config/nixpkgs/overlays/commandbox.nix and the package at ~/.config/nixpkgs/pkgs/commandbox.nix and update the paths in the file above accordingly and run nix-env -i commandbox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment