Created
February 12, 2020 05:00
-
-
Save lukaslaobeyer/d397cea659a7dc890423101e973af671 to your computer and use it in GitHub Desktop.
Sketch Synthesizer Nix Expressions
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
with import <nixpkgs> {}; | |
let | |
sketch-backend = callPackage ./sketch-backend.nix {}; | |
sketch-frontend = callPackage ./sketch-frontend.nix { sketch-backend = sketch-backend; }; | |
in | |
mkShell { | |
buildInputs = [ sketch-backend sketch-frontend ]; | |
} |
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 | |
, bison, flex | |
}: | |
stdenv.mkDerivation rec { | |
name = "sketch-backend-v${version}"; | |
version = "1.7.5"; | |
src = fetchurl { | |
url = "https://people.csail.mit.edu/asolar/sketch-${version}.tar.gz"; | |
sha256 = "0cbx1svx94h7qgcvcc8hisq6dbjs8bh8xq0zbyly66sc3bsc70l4"; | |
}; | |
buildInputs = [ bison flex ]; | |
preConfigure = '' | |
cd sketch-backend | |
''; | |
} |
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 | |
, openjdk | |
, sketch-backend | |
}: | |
stdenv.mkDerivation rec { | |
name = "sketch-frontend-v${version}"; | |
version = "1.7.5"; | |
src = fetchurl { | |
url = "https://people.csail.mit.edu/asolar/sketch-${version}.tar.gz"; | |
sha256 = "0cbx1svx94h7qgcvcc8hisq6dbjs8bh8xq0zbyly66sc3bsc70l4"; | |
}; | |
buildInputs = [ sketch-backend openjdk ]; | |
preConfigure = '' | |
cd sketch-frontend | |
''; | |
installPhase = '' | |
mkdir -p $out/bin | |
install -m 644 *jar "$out/bin" && install -m 755 sketch "$out/bin" | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment