nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 106 lines 2.0 kB view raw
1{ 2 stdenv, 3 lib, 4 fetchurl, 5 alsa-lib, 6 atk, 7 cairo, 8 cups, 9 dbus, 10 dpkg, 11 expat, 12 gdk-pixbuf, 13 glib, 14 gtk3, 15 libX11, 16 libXScrnSaver, 17 libXcomposite, 18 libXcursor, 19 libXdamage, 20 libXext, 21 libXfixes, 22 libXi, 23 libXrandr, 24 libXrender, 25 libXtst, 26 libdrm, 27 libpulseaudio, 28 libxcb, 29 libxkbcommon, 30 libxshmfence, 31 libgbm, 32 nspr, 33 nss, 34 pango, 35 udev, 36}: 37 38let 39 common = import ./common.nix { inherit fetchurl; }; 40 inherit (stdenv.hostPlatform) system; 41 libPath = lib.makeLibraryPath [ 42 alsa-lib 43 atk 44 cairo 45 cups 46 dbus 47 expat 48 gdk-pixbuf 49 glib 50 gtk3 51 libX11 52 libXcomposite 53 libXdamage 54 libXext 55 libXfixes 56 libXi 57 libXrandr 58 libdrm 59 libxcb 60 libxkbcommon 61 libxshmfence 62 libgbm 63 nspr 64 nss 65 pango 66 stdenv.cc.cc 67 libXScrnSaver 68 libXcursor 69 libXrender 70 libXtst 71 libpulseaudio 72 udev 73 ]; 74in 75stdenv.mkDerivation rec { 76 inherit (common) pname version; 77 src = common.sources.${system} or (throw "Source for ${pname} is not available for ${system}"); 78 79 nativeBuildInputs = [ dpkg ]; 80 81 installPhase = '' 82 mkdir -p "$out/bin" 83 mv opt "$out/" 84 85 ln -s "$out/opt/Roam Research/roam-research" "$out/bin/roam-research" 86 patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath "${libPath}:$out/opt/Roam Research:\$ORIGIN" "$out/opt/Roam Research/roam-research" 87 88 mv usr/* "$out/" 89 90 substituteInPlace $out/share/applications/roam-research.desktop \ 91 --replace "/opt/Roam Research/roam-research" "roam-research" 92 ''; 93 94 # autoPatchelfHook/patchelf are not used because they cause the binary to coredump. 95 dontPatchELF = true; 96 97 meta = with lib; { 98 description = "Note-taking tool for networked thought"; 99 homepage = "https://roamresearch.com/"; 100 maintainers = with lib.maintainers; [ dbalan ]; 101 sourceProvenance = with sourceTypes; [ binaryNativeCode ]; 102 license = licenses.unfree; 103 platforms = [ "x86_64-linux" ]; 104 mainProgram = "roam-research"; 105 }; 106}