diff --git a/homes/desktop.nix b/homes/desktop.nix index 6bd2945..980d220 100644 --- a/homes/desktop.nix +++ b/homes/desktop.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: { +{ pkgs, custom-pkgs, ... }: { imports = [ ./../programs/firefox.nix @@ -30,6 +30,7 @@ tex-fmt woodpecker-cli (texlive.combine { inherit (texlive) scheme-basic latex-bin latexmk; }) + custom-pkgs.ark ]; shellAliases = { code = "codium"; }; }; diff --git a/pkgs/ark.nix b/pkgs/ark.nix new file mode 100644 index 0000000..5c8d456 --- /dev/null +++ b/pkgs/ark.nix @@ -0,0 +1,59 @@ +{ pkgs, lib, ... }: + +let + version = "0.1.174"; + sha256 = { + x86_64-linux = "sha256-fZnVR5V9VaCmj4tkCrYRv3ouKr0gFukyLdEqvcb1c/8="; + aarch64-linux = "sha256-yj7UHUqnnlTz9ZYsH0UHgnhDY7bBZzff09KbYwOINj8="; + darwin = "sha256-cI1Xrico/0SHbuPwYLQNS6crJbY5gaVuAR02u5O+NPc="; + }; + +in with pkgs; +stdenv.mkDerivation { + name = "ark"; + inherit version; + src = { + x86_64-linux = fetchurl { + url = + "https://github.com/posit-dev/ark/releases/download/${version}/ark-${version}-linux-x64.zip"; + sha256 = sha256.x86_64-linux; + }; + aarch64-linux = fetchurl { + url = + "https://github.com/posit-dev/ark/releases/download/${version}/ark-${version}-linux-arm64.zip"; + sha256 = sha256.aarch64-linux; + }; + x86_64-darwin = fetchurl { + url = + "https://github.com/posit-dev/ark/releases/download/${version}/ark-${version}-darwin-universal.zip"; + sha256 = sha256.darwin; + }; + aarch64-darwin = fetchurl { + url = + "https://github.com/posit-dev/ark/releases/download/${version}/ark-${version}-darwin-universal.zip"; + sha256 = sha256.darwin; + }; + }.${stdenv.hostPlatform.system} or (throw + "Unsupported system: ${stdenv.hostPlatform.system}"); + + # Nix reports "unpacker appears to have produced no directories" without this + # line. Not sure why sc4pac doesn't need it when it is also a zip archive, but + # I found this article that pointed me to this line: + # https://sekun.net/blog/packaging-prebuilt-binaries-with-nix/ + sourceRoot = "."; + + nativeBuildInputs = [ unzip ]; + + installPhase = '' + mkdir -p $out/bin + unzip $src -d $out/bin + chmod +x $out/bin/ark + ''; + + meta = with lib; { + description = "Ark is an R kernel for Jupyter notebooks"; + homepage = "https://github.com/posit-dev/ark"; + license = licenses.mit; + platforms = platforms.unix; + }; +} diff --git a/pkgs/default.nix b/pkgs/default.nix index ce6c178..2e0c11e 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,5 +1,6 @@ { pkgs, ... }: { + ark = pkgs.callPackage ./ark.nix { }; sc4pac = pkgs.callPackage ./sc4pac.nix { }; } diff --git a/playbooks/packages.yaml b/playbooks/packages.yaml index 7d31ca4..4fd609d 100644 --- a/playbooks/packages.yaml +++ b/playbooks/packages.yaml @@ -53,6 +53,9 @@ name: - chromium - firefoxpwa + - fontconfig-devel + - freetype-devel + - fribidi-devel - ghostty - inkscape - jq @@ -60,6 +63,10 @@ - kdenlive - kdiff3 - krita + - libjpeg-devel + - libpng-devel + - libtiff-devel + - libwebp-devel - musescore - nextcloud-client - nextcloud-client-dolphin