diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-10-20 22:09:03 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-10-20 22:09:03 +0000 |
commit | 50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e (patch) | |
tree | f2556b911180125ccbb7ed0e78a54e92da89adce /nixpkgs/pkgs/applications/office/roam-research/default.nix | |
parent | 4c16d4548a98563c9d9ad76f4e5b2202864ccd54 (diff) | |
parent | cfc75eec4603c06503ae750f88cf397e00796ea8 (diff) | |
download | nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.gz nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.bz2 nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.lz nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.xz nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.zst nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.zip |
Merge commit 'cfc75eec4603c06503ae750f88cf397e00796ea8'
Conflicts: nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix
Diffstat (limited to 'nixpkgs/pkgs/applications/office/roam-research/default.nix')
-rw-r--r-- | nixpkgs/pkgs/applications/office/roam-research/default.nix | 87 |
1 files changed, 7 insertions, 80 deletions
diff --git a/nixpkgs/pkgs/applications/office/roam-research/default.nix b/nixpkgs/pkgs/applications/office/roam-research/default.nix index e1ca9bb47e80..408f026bc57a 100644 --- a/nixpkgs/pkgs/applications/office/roam-research/default.nix +++ b/nixpkgs/pkgs/applications/office/roam-research/default.nix @@ -1,81 +1,8 @@ -{ stdenv, lib, fetchurl, alsa-lib, atk, cairo, cups, dbus, dpkg, expat -, gdk-pixbuf, glib, gtk3, libX11, libXScrnSaver, libXcomposite, libXcursor -, libXdamage, libXext, libXfixes, libXi, libXrandr, libXrender, libXtst, libdrm -, libpulseaudio, libxcb, libxkbcommon, libxshmfence, mesa, nspr, nss, pango -, udev, }: - +{ stdenv, callPackage, ... }@args: let - libPath = lib.makeLibraryPath [ - alsa-lib - atk - cairo - cups - dbus - expat - gdk-pixbuf - glib - gtk3 - libX11 - libXcomposite - libXdamage - libXext - libXfixes - libXi - libXrandr - libdrm - libxcb - libxkbcommon - libxshmfence - mesa - nspr - nss - pango - stdenv.cc.cc - libXScrnSaver - libXcursor - libXrender - libXtst - libpulseaudio - udev - ]; -in stdenv.mkDerivation rec { - pname = "roam-research"; - version = "0.0.18"; - - src = fetchurl { - url = - "https://roam-electron-deploy.s3.us-east-2.amazonaws.com/${pname}_${version}_amd64.deb"; - sha256 = "sha256-veDWBFZbODsdaO1UdfuC4w6oGCkeVBe+fqKn5XVHKDQ="; - }; - - nativeBuildInputs = [ dpkg ]; - - unpackPhase = '' - mkdir pkg - dpkg-deb -x $src pkg - sourceRoot=pkg - ''; - - installPhase = '' - mkdir -p "$out/bin" - mv opt "$out/" - - ln -s "$out/opt/Roam Research/roam-research" "$out/bin/roam-research" - patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath "${libPath}:$out/opt/Roam Research:\$ORIGIN" "$out/opt/Roam Research/roam-research" - - mv usr/* "$out/" - - substituteInPlace $out/share/applications/roam-research.desktop \ - --replace "/opt/Roam Research/roam-research" "roam-research" - ''; - - dontPatchELF = true; - meta = with lib; { - description = "A note-taking tool for networked thought."; - homepage = "https://roamresearch.com/"; - maintainers = with lib.maintainers; [ dbalan ]; - sourceProvenance = with sourceTypes; [ binaryNativeCode ]; - license = licenses.unfree; - platforms = [ "x86_64-linux" ]; - }; -} + extraArgs = removeAttrs args [ "callPackage" ]; +in +if stdenv.isDarwin then + callPackage ./darwin.nix (extraArgs // { }) +else + callPackage ./linux.nix (extraArgs // { }) |