From 67f39130e18538ace5012f0dca65d2b870d8e832 Mon Sep 17 00:00:00 2001 From: Mikhail Chekan Date: Mon, 17 May 2021 16:25:20 +0800 Subject: [PATCH] Add basic Nix packaging --- default.nix | 5 +++++ release.nix | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 default.nix create mode 100644 release.nix diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..c890ba6 --- /dev/null +++ b/default.nix @@ -0,0 +1,5 @@ +{ pkgs ? import {} }: + +# TODO: add shell support +pkgs.callPackage ./release.nix { } + diff --git a/release.nix b/release.nix new file mode 100644 index 0000000..a9b0410 --- /dev/null +++ b/release.nix @@ -0,0 +1,33 @@ +{ stdenv, lib, fetchFromGitHub, buildGoModule +, git +}: + +buildGoModule rec { + pname = "mycorrhiza"; + version = "1.1.0"; + + src = ./.; + + # That's for a nixpkgs release or something. Mind the hashes. + # src = fetchFromGitHub { + # owner = "bouncepaw"; + # repo = "mycorrhiza"; + # rev = "v${version}"; + # sha256 = "0di4msrl44jcnhck11k0r7974cjnwdyw45b3hf0s3dbwx6ijdkdd"; + # fetchSubmodules = true; + # }; + + vendorSha256 = "0hxcbfh55avly9gvdysqgjzh66g7rdy2l0wmy9jnlq0skpa6j0jq"; + + subPackages = [ "." ]; + + propagatedBuildInputs = [ git ]; + + meta = with lib; { + description = "Filesystem and git-based wiki engine written in Go using mycomarkup as its primary markup language"; + homepage = "https://github.com/bouncepaw/mycorrhiza"; + license = licenses.agpl3; + # maintainers = with maintainers; [ bouncepaw ]; + platforms = platforms.linux; + }; +}