diff options
author | kirillrdy <kirillrdy@gmail.com> | 2024-02-28 19:49:45 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-28 19:49:45 +1100 |
commit | 44dff7c2c0c6489697a7d7a758742a55b4f0a891 (patch) | |
tree | 6c3c1fd3f7923d12846993c88545220ad9d674ff /pkgs/by-name/un | |
parent | bdf4fdca876fc41e1b084eb49dfd29a7371129d1 (diff) | |
parent | f844dad6ee0a58a7aebf16fd7c02c1bb93b3f6b2 (diff) | |
download | nixlib-44dff7c2c0c6489697a7d7a758742a55b4f0a891.tar nixlib-44dff7c2c0c6489697a7d7a758742a55b4f0a891.tar.gz nixlib-44dff7c2c0c6489697a7d7a758742a55b4f0a891.tar.bz2 nixlib-44dff7c2c0c6489697a7d7a758742a55b4f0a891.tar.lz nixlib-44dff7c2c0c6489697a7d7a758742a55b4f0a891.tar.xz nixlib-44dff7c2c0c6489697a7d7a758742a55b4f0a891.tar.zst nixlib-44dff7c2c0c6489697a7d7a758742a55b4f0a891.zip |
Merge pull request #290078 from nevivurn/feat/unison-2.53.4
unison: 2.53.2 -> 2.53.4
Diffstat (limited to 'pkgs/by-name/un')
-rw-r--r-- | pkgs/by-name/un/unison/package.nix | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/pkgs/by-name/un/unison/package.nix b/pkgs/by-name/un/unison/package.nix new file mode 100644 index 000000000000..2d68ba5799b4 --- /dev/null +++ b/pkgs/by-name/un/unison/package.nix @@ -0,0 +1,64 @@ +{ lib +, stdenv +, fetchFromGitHub +, ocamlPackages +, copyDesktopItems +, makeDesktopItem +, wrapGAppsHook +, gsettings-desktop-schemas +, enableX11 ? !stdenv.isDarwin +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "unison"; + version = "2.53.4"; + + src = fetchFromGitHub { + owner = "bcpierce00"; + repo = "unison"; + rev = "v${finalAttrs.version}"; + hash = "sha256-nFT6FjlQjh6qx0fepmT4aiQj2SxA7U/as+IU9xXNok0="; + }; + + strictDeps = true; + + # uimac requires xcode + postPatch = '' + sed -i -e 's/ macuimaybe//' src/Makefile + ''; + + nativeBuildInputs = [ ocamlPackages.ocaml ocamlPackages.findlib ] + ++ lib.optionals enableX11 [ copyDesktopItems wrapGAppsHook ]; + buildInputs = lib.optionals enableX11 [ gsettings-desktop-schemas ocamlPackages.lablgtk3 ]; + + makeFlags = [ "PREFIX=$(out)" ] + ++ lib.optionals (!ocamlPackages.ocaml.nativeCompilers) [ "NATIVE=false" ]; + + postInstall = lib.optionalString enableX11 '' + install -D $src/icons/U.svg $out/share/icons/hicolor/scalable/apps/unison.svg + ''; + + dontStrip = !ocamlPackages.ocaml.nativeCompilers; + + desktopItems = lib.optional enableX11 (makeDesktopItem { + name = finalAttrs.pname; + desktopName = "Unison"; + comment = "Bidirectional file synchronizer"; + genericName = "File synchronization tool"; + exec = "unison-gui"; + icon = "unison"; + categories = [ "Utility" "FileTools" "GTK" ]; + startupNotify = true; + startupWMClass = "Unison"; + }); + + meta = with lib; { + homepage = "https://www.cis.upenn.edu/~bcpierce/unison/"; + description = "Bidirectional file synchronizer"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ viric nevivurn ]; + platforms = platforms.unix; + broken = stdenv.isDarwin && enableX11; # unison-gui and uimac are broken on darwin + mainProgram = if enableX11 then "unison-gui" else "unison"; + }; +}) |