Last active
October 12, 2017 16:34
-
-
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)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
self: super: { | |
commandbox = super.callPackage /path/to/commandbox_package {}; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ 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 ; | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 runnix-env -i commandbox
.