From fe9af32e030785546a729e6305964b96b33f7270 Mon Sep 17 00:00:00 2001 From: Yo'av Moshe Date: Fri, 6 Sep 2024 19:47:39 +0200 Subject: [PATCH] add a nix file --- default.nix | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 default.nix diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..97f7ce1 --- /dev/null +++ b/default.nix @@ -0,0 +1,33 @@ +{ lib, stdenv, go, fetchGit }: + +stdenv.mkDerivation rec { + pname = "pipet"; + version = "unstable-2024-09-06"; + + src = fetchGit { + url = "https://github.com/bjesus/pipet.git"; + rev = "main"; + }; + + buildInputs = [ go ]; + + buildPhase = '' + export GOPATH="$PWD/go" + mkdir -p $GOPATH/src/github.com/bjesus + ln -s $src $GOPATH/src/github.com/bjesus/pipet + cd $GOPATH/src/github.com/bjesus/pipet/cmd/pipet + go build -o $out/bin/pipet + ''; + + installPhase = '' + mkdir -p $out/bin + mv pipet $out/bin/ + ''; + + meta = with lib; { + description = "a swiss-army tool for scraping and extracting data from online assets, made for hackers"; + homepage = "https://github.com/bjesus/pipet"; + license = licenses.mit; + maintainers = [ "Yo'av Moshe" ]; + }; +}