From c625468d246d0ff8b8764c887c6612e2c60c802b Mon Sep 17 00:00:00 2001 From: larstvei Date: Sun, 20 Nov 2022 13:17:46 +0100 Subject: [PATCH] Add local package for Maude The "official" package for Maude is broken on darwin. This one downloads and installs the binary. Not as nice as building from source, but much easier... --- flake.nix | 2 ++ modules/home.nix | 1 + pkgs/maude-mac/default.nix | 39 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 pkgs/maude-mac/default.nix diff --git a/flake.nix b/flake.nix index 763c364..166c8c6 100644 --- a/flake.nix +++ b/flake.nix @@ -69,6 +69,8 @@ ./patches/system-appearance.patch ]; }); + + maude-mac = final.callPackage ./pkgs/maude-mac {}; }) ]; }; diff --git a/modules/home.nix b/modules/home.nix index 4e03604..8faf6ce 100644 --- a/modules/home.nix +++ b/modules/home.nix @@ -37,6 +37,7 @@ htop inkscape leiningen + maude-mac nixpkgs-fmt jdk pandoc diff --git a/pkgs/maude-mac/default.nix b/pkgs/maude-mac/default.nix new file mode 100644 index 0000000..e771fb4 --- /dev/null +++ b/pkgs/maude-mac/default.nix @@ -0,0 +1,39 @@ +{ lib, stdenv, fetchurl, unzip, ... }: + +stdenv.mkDerivation rec { + pname = "maude"; + version = "3.2.1"; + + src = fetchurl { + url = "https://github.com/SRI-CSL/Maude/releases/download/${version}/Maude-${version}-macos.zip"; + sha256 = "sha256-m+bgdYzzoQq6knrUkRtr3rXqHLNgr3kquKzuSUIDa2I="; + }; + + nativeBuildInputs = [ unzip ]; + + installPhase = '' + mkdir -p $out/bin + cp *.maude $out/bin/ + cp maude.Darwin64 $out/bin/maude + ''; + + meta = with lib; { + homepage = "http://maude.cs.illinois.edu/"; + description = "High-level specification language"; + license = lib.licenses.gpl2Plus; + + longDescription = '' + Maude is a high-performance reflective language and system + supporting both equational and rewriting logic specification and + programming for a wide range of applications. Maude has been + influenced in important ways by the OBJ3 language, which can be + regarded as an equational logic sublanguage. Besides supporting + equational specification and programming, Maude also supports + rewriting logic computation. + ''; + + sourceProvenance = with sourceTypes; [ binaryNativeCode ]; + platforms = platforms.darwin; + maintainers = with maintainers; [ larstvei ]; + }; +}