Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at netboot-syslinux-multiplatform 45 lines 1.3 kB view raw
1{ lib, stdenv, fetchFromGitHub, libX11, libXext, makeWrapper, ncurses, cmake }: 2 3stdenv.mkDerivation rec { 4 # The Self wrapper stores source in $XDG_DATA_HOME/self or ~/.local/share/self 5 # so that it can be written to when using the Self transposer. Running 'Self' 6 # after installation runs without an image. You can then build a Self image with: 7 # $ cd ~/.local/share/self/objects 8 # $ Self 9 # > 'worldBuilder.self' _RunScript 10 # 11 # This image can later be started with: 12 # $ Self -s myimage.snap 13 # 14 pname = "self"; 15 version = "2017.1"; 16 17 src = fetchFromGitHub { 18 owner = "russellallen"; 19 repo = pname; 20 rev = version; 21 sha256 = "C/1Q6yFmoXx2F97xuvkm8DxFmmvuBS7uYZOxq/CRNog="; 22 }; 23 24 nativeBuildInputs = [ cmake makeWrapper ]; 25 buildInputs = [ ncurses libX11 libXext ]; 26 27 selfWrapper = ./self; 28 29 installPhase = '' 30 mkdir -p "$out"/bin 31 cp ./vm/Self "$out"/bin/Self.wrapped 32 mkdir -p "$out"/share/self 33 cp -r ../objects "$out"/share/self/ 34 makeWrapper $selfWrapper $out/bin/Self \ 35 --set SELF_ROOT "$out" 36 ''; 37 38 meta = with lib; { 39 description = "A prototype-based dynamic object-oriented programming language, environment, and virtual machine"; 40 homepage = "https://selflanguage.org/"; 41 license = licenses.bsd3; 42 maintainers = [ ]; 43 platforms = platforms.linux; 44 }; 45}