From 91bf31fd4c648feac9de857a37345bfb1163693d Mon Sep 17 00:00:00 2001 From: Daniel Kempkens Date: Wed, 17 Aug 2022 14:07:54 +0200 Subject: [PATCH] Add marksman --- .github/workflows/build.yml | 2 ++ README.md | 1 + overlay.nix | 1 + packages.nix | 1 + packages/cliclick.nix | 2 +- packages/marksman.nix | 43 +++++++++++++++++++++++++++++++++++++ 6 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 packages/marksman.nix diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ec879f1..1f6cf7f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,6 +21,7 @@ jobs: authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - run: nix build '.#fennel-luajit' - run: nix build '.#luarocks-jsregexp' + - run: nix build '.#marksman' - run: nix build '.#q' build-x86_64-darwin: @@ -37,5 +38,6 @@ jobs: - run: nix build '.#cliclick' - run: nix build '.#fennel-luajit' - run: nix build '.#luarocks-jsregexp' + - run: nix build '.#marksman' - run: nix build '.#phantomjs' - run: nix build '.#q' diff --git a/README.md b/README.md index 8fa3557..742dba2 100644 --- a/README.md +++ b/README.md @@ -6,5 +6,6 @@ * [cliclick](https://github.com/BlueM/cliclick) * fennel-luajit * [luarocks-jsregexp](https://github.com/kmarius/jsregexp) +* [marksman](https://github.com/artempyanykh/marksman) * [phantomjs](https://github.com/ariya/phantomjs) * [q](https://github.com/natesales/q) diff --git a/overlay.nix b/overlay.nix index a477fa6..d403eab 100644 --- a/overlay.nix +++ b/overlay.nix @@ -8,6 +8,7 @@ in inherit (custom) cliclick; inherit (custom) fennel-luajit; inherit (custom) luarocks-jsregexp; + inherit (custom) marksman; inherit (custom) phantomjs; inherit (custom) q; } diff --git a/packages.nix b/packages.nix index c21b00c..0686a65 100644 --- a/packages.nix +++ b/packages.nix @@ -5,6 +5,7 @@ cliclick = import ./packages/cliclick.nix { inherit system lib pkgs; }; fennel-luajit = import ./packages/fennel-luajit.nix { inherit system lib pkgs; }; luarocks-jsregexp = import ./packages/luarocks-jsregexp.nix { inherit system lib pkgs; }; + marksman = import ./packages/marksman.nix { inherit system lib pkgs; }; phantomjs = import ./packages/phantomjs.nix { inherit system lib pkgs; }; q = import ./packages/q.nix { inherit system lib pkgs; }; } diff --git a/packages/cliclick.nix b/packages/cliclick.nix index 5cda9a2..d72d731 100644 --- a/packages/cliclick.nix +++ b/packages/cliclick.nix @@ -6,7 +6,7 @@ pkgs.stdenv.mkDerivation { src = pkgs.fetchFromGitHub { owner = "BlueM"; - repo = "cliclick"; + repo = pname; rev = "79a49ff25f550fda5b2a1806366aa9d7facc46f3"; sha256 = "Wj1niLXCwBYTsXB2Qkdvs85BJD7uRqGIerCTjhS20ZQ="; fetchSubmodules = false; diff --git a/packages/marksman.nix b/packages/marksman.nix new file mode 100644 index 0000000..0b9d578 --- /dev/null +++ b/packages/marksman.nix @@ -0,0 +1,43 @@ +{ system, lib, pkgs }: + +let + osSuffix = if pkgs.stdenv.isDarwin then "macos" else "linux"; + + osHash = + if pkgs.stdenv.isDarwin then + "00bl5ls0lmcz24xxykjlgr99dx74rcs9ia0hp6xf5hck9239vxik" + else + "1vsk66nwp39xbivvawrz50y8y7za4xdclq61pl5ry77dbj8pv6np"; +in +pkgs.stdenv.mkDerivation rec { + pname = "marksman"; + version = "2022-08-15"; + + src = pkgs.fetchurl { + url = "https://github.com/artempyanykh/${pname}/releases/download/${version}/marksman-${osSuffix}"; + sha256 = osHash; + }; + + unpackPhase = '' + true + ''; + + dontStrip = true; + + installPhase = '' + install -D $src $out/bin/marksman + ''; + + doInstallCheck = true; + + installCheckPhase = '' + $out/bin/marksman --version + ''; + + meta = with lib; { + description = "Write Markdown with code assist and intelligence in the comfort of your favourite editor"; + homepage = "https://github.com/artempyanykh/marksman"; + license = licenses.mit; + platforms = [ "x86_64-darwin" "x86_64-linux" ]; + }; +}