forked from cory/tildefriends
build(nix): add Nix support
This commit is contained in:
48
default.nix
Normal file
48
default.nix
Normal file
@ -0,0 +1,48 @@
|
||||
{
|
||||
pkgs ? import <nixpkgs> {},
|
||||
lib ? import <nixpkgs/lib>,
|
||||
}:
|
||||
pkgs.stdenv.mkDerivation rec {
|
||||
pname = "tildefriends";
|
||||
version = "0.0.19";
|
||||
|
||||
src = pkgs.fetchFromGitea {
|
||||
domain = "dev.tildefriends.net";
|
||||
owner = "cory";
|
||||
repo = "tildefriends";
|
||||
# rev = "v${version}";
|
||||
rev = "47838d5e482cb4aac40190fa0414f08b8cf94d40";
|
||||
hash = "sha256-mb5KYvWPIqgV64FOaXKHm2ownBJiiSRtdH8+YWiXwvE="; # 47838d5e482cb4aac40190fa0414f08b8cf94d40
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
gnumake
|
||||
openssl
|
||||
which
|
||||
];
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
openssl
|
||||
which
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
make -j $NIX_BUILD_CORES release
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp -r out/release/tildefriends $out/bin
|
||||
'';
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta = with pkgs; {
|
||||
homepage = "https://tildefriends.net";
|
||||
description = "Make apps and friends from the comfort of your web browser.";
|
||||
mainProgram = "tildefriends";
|
||||
license = with lib.licenses; [mit];
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user