nixpkgs/pkgs/applications/graphics/fstl/default.nix
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00

34 lines
775 B
Nix

{ lib, stdenv, fetchFromGitHub, mkDerivation, cmake }:
mkDerivation rec {
pname = "fstl";
version = "0.10.0";
nativeBuildInputs = [ cmake ];
installPhase = lib.optionalString stdenv.isDarwin ''
runHook preInstall
mkdir -p $out/Applications
mv fstl.app $out/Applications
runHook postInstall
'';
src = fetchFromGitHub {
owner = "fstl-app";
repo = "fstl";
rev = "v" + version;
hash = "sha256-z2X78GW/IeiPCnwkeLBCLjILhfMe2sT3V9Gbw4TSf4c=";
};
meta = with lib; {
description = "The fastest STL file viewer";
mainProgram = "fstl";
homepage = "https://github.com/fstl-app/fstl";
license = licenses.mit;
platforms = platforms.linux ++ platforms.darwin;
maintainers = with maintainers; [ tweber ];
};
}