Hi! I’m a nix-noob and I need some help packaging the Grayjay desktop app FUTO recently released (in preview/early version).
You can find the download link for the application here: Grayjay App - Follow Creators Not Platforms
This is where I got so far:
- I’m running NixOS 24.11
- I created a “grayjay” folder with two files in there: grayjay.nix and default.nix (see contents below)
- I seem to be able to successfully build the package with
nix-build -A grayjay
as I get no errors and there is a “result” hardlink to the nix-store. - I tried to install the package with a
(pkgs.callPackage ../grayjay/grayjay.nix {})
line in myconfiguration.nix
, but it fails with an error:
Could not start dynamically linked executable: ./result/bin/grayjay/Grayjay
NixOS cannot run dynamically linked executables intended for generic
linux environments out of the box. For more information, see:
https://nix.dev/permalink/stub-ld
I’m pretty sure I’m doing something wrong in the installPhase
, as it seems from the zip file contents that this is a “CEF” (chromium embedded framework) based application. I was not able to find any directions on how to install/package such an application on nix.
Any pointers are greatly appreciated! Once I get this working (and cleanup and optimized) I want to publish the package to the nixos packages repo.
grayjay.nix
{
stdenv,
fetchzip,
ffmpeg,
}:
stdenv.mkDerivation {
pname = "Grayjay";
version = "2";
src = fetchzip {
url = "https://updater.grayjay.app/Apps/Grayjay.Desktop/Grayjay.Desktop-linux-x64.zip";
sha256 = "UqTDpPtl6kNg/4y3+HsQI+YBQ0vjvvm37xiYY90+gzw=";
};
buildInputs = [ffmpeg];
doCheck = false;
installPhase = ''
ls -a
mkdir -p $out/bin/grayjay
install ./Grayjay $out/bin/grayjay
chmod a+x $out/bin/grayjay
runHook postInstall
'';
meta = {
description = "Follow Creators, Not Platforms";
homepage = "https://grayjay.app/";
#license = licenses.unfree;
#maintainers = with maintainers; [running-grass];
platforms = ["x86_64-linux"];
};
}
default.nix
# default.nix
let
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-24.11";
pkgs = import nixpkgs {
config = {};
overlays = [];
};
in {
grayjay = pkgs.callPackage ./grayjay.nix {};
}