diff --git a/README.md b/README.md index 21121a1..a5221d6 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,8 @@ updates, also add `packages//upstream.json` (see below). | `halloy` | [squidowl/halloy](https://github.com/squidowl/halloy) | [GitHub releases](https://github.com/squidowl/halloy/releases) / `halloy-*-x86_64-linux.tar.gz` | | `pulp` | [cheywood/Pulp](https://gitlab.gnome.org/cheywood/Pulp) | [Flathub](https://flathub.org/apps/details/org.gnome.gitlab.cheywood.Pulp) | | `mimic` | [ArijanJ/Mimic](https://github.com/ArijanJ/Mimic) | [Flathub](https://flathub.org/apps/io.github.arijanj.Mimic) | +| `portfolio` | [tchx84/Portfolio](https://github.com/tchx84/Portfolio) | [Flathub](https://flathub.org/apps/details/dev.tchx84.Portfolio) | +| `eyg` | [CrowdHailer/eyg-lang](https://github.com/CrowdHailer/eyg-lang) | `curl -fsSL https://eyg.run/install \| bash` | | `lore` | [EpicGames/lore](https://github.com/EpicGames/lore) | [install script](https://raw.githubusercontent.com/EpicGames/lore/main/scripts/install.sh) / release tarballs | | `loreserver` | [EpicGames/lore](https://github.com/EpicGames/lore) | [install script](https://raw.githubusercontent.com/EpicGames/lore/main/scripts/install.sh) (`--server` / `--demo`) / release tarballs | @@ -55,6 +57,8 @@ nix build .#zed-preview # x86_64-linux only nix build .#halloy # x86_64-linux only nix build .#pulp # linux only (GNOME/GTK4) nix build .#mimic # linux only (GTK4/libadwaita) +nix build .#portfolio # linux only (GTK4/libadwaita file manager) +nix build .#eyg # linux + darwin (all four systems) nix build .#lore # x86_64-linux / aarch64-linux / aarch64-darwin nix build .#loreserver # same platforms as lore @@ -71,6 +75,9 @@ nix run .#zed-preview -- --version nix run .#halloy -- --version nix run .#pulp nix run .#mimic +nix run .#portfolio +nix run .#eyg -- --version +nix run .#eyg -- eval -c '!int_add(1, 1)' nix run .#lore -- --version nix run .#loreserver -- --version @@ -86,6 +93,8 @@ nix profile install .#zed-preview nix profile install .#halloy nix profile install .#pulp nix profile install .#mimic +nix profile install .#portfolio +nix profile install .#eyg nix profile install .#lore nix profile install .#loreserver ``` @@ -431,6 +440,25 @@ By hand: ``` 3. Paste the SRI hash into `fetchFromGitLab.hash`, then `nix build .#pulp`. +### Manual steps (portfolio) + +`portfolio` is a minimalist GTK4 file manager built from source (Meson + Python). +Prefer the updater: + +```bash +./scripts/update-packages.sh portfolio +``` + +By hand: + +1. Bump `version` in `packages/portfolio/default.nix` (e.g. `1.0.3`). +2. Prefetch the source hash: + ```bash + nix-prefetch-url --unpack "https://github.com/tchx84/Portfolio/archive/refs/tags/vX.Y.Z.tar.gz" + nix hash convert --hash-algo sha256 --to sri + ``` +3. Paste the SRI hash into `fetchFromGitHub.hash`, then `nix build .#portfolio`. + ### Manual steps (lore / loreserver) `lore` and `loreserver` ship separate multi-platform release tarballs (dynamic diff --git a/flake.nix b/flake.nix index 29b26b1..34c3b01 100644 --- a/flake.nix +++ b/flake.nix @@ -37,6 +37,8 @@ whetuu = pkgs.callPackage ./packages/whetuu { }; pullrun = pkgs.callPackage ./packages/pullrun { }; gleam-preview = pkgs.callPackage ./packages/gleam-preview { }; + # Official prebuilt EYG CLI (linux + darwin; dynamic glibc on Linux). + eyg = pkgs.callPackage ./packages/eyg { }; # Wrapper around scripts/update-packages.sh (needs a writable checkout). update = pkgs.callPackage ./packages/update { }; default = self.packages.${system}.vit; @@ -65,6 +67,8 @@ pulp = pkgs.callPackage ./packages/pulp { }; # GTK4/libadwaita default-app manager; Linux only. mimic = pkgs.callPackage ./packages/mimic { }; + # Minimalist GTK4/libadwaita file manager (mobile-friendly); Linux only. + portfolio = pkgs.callPackage ./packages/portfolio { }; } ); @@ -100,6 +104,10 @@ type = "app"; program = "${self.packages.${system}.gleam-preview}/bin/gleam-preview"; }; + eyg = { + type = "app"; + program = "${self.packages.${system}.eyg}/bin/eyg"; + }; update = { type = "app"; program = "${self.packages.${system}.update}/bin/update"; @@ -145,6 +153,10 @@ type = "app"; program = "${self.packages.${system}.mimic}/bin/mimic"; }; + portfolio = { + type = "app"; + program = "${self.packages.${system}.portfolio}/bin/portfolio"; + }; } ); }; diff --git a/packages/eyg/default.nix b/packages/eyg/default.nix new file mode 100644 index 0000000..d800ab0 --- /dev/null +++ b/packages/eyg/default.nix @@ -0,0 +1,75 @@ +{ + lib, + stdenv, + fetchurl, + autoPatchelfHook, +}: + +let + # Prebuilt CLI binaries from https://github.com/CrowdHailer/eyg-lang/releases + # (tag gleam_cli-v{version}). Asset names match install.sh: eyg-{os}-{arch}. + # Plain executable files (not tarballs); Linux builds are dynamic glibc. + sources = { + x86_64-linux = { + url = "https://github.com/CrowdHailer/eyg-lang/releases/download/gleam_cli-v0.0.2/eyg-linux-x64"; + hash = "sha256-gSjCXY1CSmgFG1XV4/dr4Xpz4CoXwqkcNpylPaPKeOI="; + }; + aarch64-linux = { + url = "https://github.com/CrowdHailer/eyg-lang/releases/download/gleam_cli-v0.0.2/eyg-linux-arm64"; + hash = "sha256-rLgjnG92nhzfUAhuW2k/9M2sgMl2ytUxgWzC3icMyZg="; + }; + x86_64-darwin = { + url = "https://github.com/CrowdHailer/eyg-lang/releases/download/gleam_cli-v0.0.2/eyg-macos-x64"; + hash = "sha256-aYhTB+Z+WrwwwuLh7PwHd8H1EESsS0hAF5Sts1d0hNQ="; + }; + aarch64-darwin = { + url = "https://github.com/CrowdHailer/eyg-lang/releases/download/gleam_cli-v0.0.2/eyg-macos-arm64"; + hash = "sha256-zbwBhw1kS1DtXRxyD7WMmt9k7jf4HPxHBNKcKG1EsHE="; + }; + }; + + srcAttrs = + sources.${stdenv.hostPlatform.system} + or (throw "eyg: unsupported system ${stdenv.hostPlatform.system}"); +in +stdenv.mkDerivation (finalAttrs: { + pname = "eyg"; + # Release tags are gleam_cli-vX.Y.Z (not the binary's self-reported version). + version = "0.0.2"; + + src = fetchurl { + inherit (srcAttrs) url hash; + }; + + dontUnpack = true; + + # Bun-packaged binary; strip would corrupt the embedded JS/runtime payload. + dontStrip = true; + + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]; + + installPhase = '' + runHook preInstall + install -Dm755 $src $out/bin/eyg + runHook postInstall + ''; + + # Binary self-reports "eyg 0.0.0" (not the release tag), so skip versionCheckHook. + doInstallCheck = true; + installCheckPhase = '' + runHook preInstallCheck + result=$("$out/bin/eyg" eval -c '!int_add(1, 1)') + test "$result" = "2" + runHook postInstallCheck + ''; + + meta = { + description = "EYG (Eat Your Greens) — safest scripting language with structural typing and managed effects"; + homepage = "https://github.com/CrowdHailer/eyg-lang"; + changelog = "https://github.com/CrowdHailer/eyg-lang/releases/tag/gleam_cli-v${finalAttrs.version}"; + license = lib.licenses.asl20; + mainProgram = "eyg"; + platforms = builtins.attrNames sources; + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; + }; +}) diff --git a/packages/eyg/upstream.json b/packages/eyg/upstream.json new file mode 100644 index 0000000..484f74d --- /dev/null +++ b/packages/eyg/upstream.json @@ -0,0 +1,12 @@ +{ + "type": "github-release-binary", + "github": "CrowdHailer/eyg-lang", + "tag_prefix": "gleam_cli-v", + "platforms": { + "x86_64-linux": "eyg-linux-x64", + "aarch64-linux": "eyg-linux-arm64", + "x86_64-darwin": "eyg-macos-x64", + "aarch64-darwin": "eyg-macos-arm64" + }, + "description": "Official multi-platform eyg CLI binaries (dynamic glibc on Linux). Tracks gleam_cli-vX.Y.Z GitHub releases; assets are bare executables matching install.sh." +} diff --git a/packages/portfolio/default.nix b/packages/portfolio/default.nix new file mode 100644 index 0000000..4de4f01 --- /dev/null +++ b/packages/portfolio/default.nix @@ -0,0 +1,79 @@ +{ + lib, + python3, + fetchFromGitHub, + meson, + ninja, + pkg-config, + gobject-introspection, + wrapGAppsHook4, + appstream-glib, + desktop-file-utils, + gettext, + glib, + gtk3, + gtk4, + libadwaita, +}: + +python3.pkgs.buildPythonApplication (finalAttrs: { + pname = "portfolio"; + version = "1.0.3"; + # Built with meson, not a Python packaging format. + pyproject = false; + + src = fetchFromGitHub { + owner = "tchx84"; + repo = "Portfolio"; + tag = "v${finalAttrs.version}"; + hash = "sha256-KlFRgBXEoIF/UqZKSAC/oQ+OQBrl40NIXV+49jBq430="; + }; + + postPatch = '' + patchShebangs build-aux/meson + ''; + + nativeBuildInputs = [ + meson + ninja + pkg-config + gobject-introspection + wrapGAppsHook4 + appstream-glib + desktop-file-utils + gettext + # glib-compile-schemas / gtk-update-icon-cache (meson post_install). + glib + gtk3 + gtk4 + ]; + + buildInputs = [ + glib + gtk4 + libadwaita + ]; + + dependencies = with python3.pkgs; [ + pygobject3 + ]; + + postInstall = '' + ln -s dev.tchx84.Portfolio "$out/bin/portfolio" + ''; + + # Prevent double wrapping. + dontWrapGApps = true; + preFixup = '' + makeWrapperArgs+=("''${gappsWrapperArgs[@]}") + ''; + + meta = { + description = "Minimalist file manager for those who want to use Linux mobile devices"; + homepage = "https://github.com/tchx84/Portfolio"; + changelog = "https://github.com/tchx84/Portfolio/blob/v${finalAttrs.version}/CHANGELOG.md"; + license = lib.licenses.gpl3Plus; + mainProgram = "dev.tchx84.Portfolio"; + platforms = lib.platforms.linux; + }; +}) diff --git a/packages/portfolio/upstream.json b/packages/portfolio/upstream.json new file mode 100644 index 0000000..c998cca --- /dev/null +++ b/packages/portfolio/upstream.json @@ -0,0 +1,6 @@ +{ + "type": "github-tag", + "github": "tchx84/Portfolio", + "tag_prefix": "v", + "description": "Minimalist GTK4/libadwaita file manager for Linux mobile. Tracks GitHub release tags (vX.Y.Z)." +}