-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
70 lines (69 loc) · 2.23 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{
nixConfig.commit-lockfile-summary = "chore: :arrow_up: Update flake.lock";
inputs.nixpkgs.url = "nixpkgs/nixpkgs-unstable";
inputs.troll = {
url = "github:sonnyp/troll";
flake = false;
};
outputs = { nixpkgs, self, troll }:
let
appid = "surf.tangent.Tangent";
description = "Go on tangents.";
in
{
packages.x86_64-linux =
let
pkgs = import nixpkgs {
system = "x86_64-linux";
};
lib = pkgs.lib;
in
{
# TODO: This could be dramatically simplified by using Meson
default = pkgs.stdenvNoCC.mkDerivation (finalAttrs: {
pname = "tangent";
version = "0.0.1";
src = self;
nativeBuildInputs = [
pkgs.gjs
pkgs.wrapGAppsHook4
pkgs.blueprint-compiler
pkgs.meson
pkgs.ninja
pkgs.desktop-file-utils
];
enableParallelBuilding = true;
buildInputs = [
pkgs.gjs
pkgs.gtk4
pkgs.libadwaita
pkgs.libsoup_3
pkgs.webkitgtk_6_0
pkgs.glib-networking
pkgs.p11-kit
pkgs.gst_all_1.gst-libav
pkgs.gst_all_1.gst-plugins-bad
pkgs.gst_all_1.gst-plugins-base
pkgs.gst_all_1.gst-plugins-good
pkgs.gst_all_1.gst-plugins-ugly
pkgs.gst_all_1.gstreamer
];
dontPatchShebangs = true;
inherit troll;
postPatch = ''
cp --recursive $troll ./src/troll
substituteInPlace src/bin.js src/troll/gjspack/bin/gjspack --replace-fail "#!/usr/bin/env -S gjs -m" "#!${pkgs.gjs}/bin/gjs --module"
'';
postInstall = ''chmod +x $out/bin/${appid}'';
meta = {
mainProgram = appid;
description = description;
license = lib.licenses.gpl3Plus;
homepage = "https://cetera.uk/";
longDescription = builtins.readFile ./README.md;
changelog = "https://github.com/mollersuite/tangent/releases/tag/v${finalAttrs.version}";
};
});
};
};
}