-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathflake.nix
56 lines (43 loc) · 1.36 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
{
description = "GitDown";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
packages.default = pkgs.stdenv.mkDerivation( finalAttrs: {
pname = "git-down";
version = "0.1.0";
src = ./.;
nativeBuildInputs = [ pkgs.gradle ];
mtimCache = pkgs.gradle.fetchDeps {
inherit (finalAttrs) pname;
data = ./deps.json;
};
# this is required for using mitm-cache on Darwin
__darwinAllowLocalNetworking = true;
buildInputs = [ pkgs.jdk11 pkgs.mesa ];
});
devShells.default = pkgs.mkShell {
packages = [
pkgs.git
pkgs.temurin-bin-17
pkgs.mesa
pkgs.libGL
pkgs.libGLU
pkgs.xorg.libX11
pkgs.xorg.libXext
pkgs.fontconfig
];
shellHook = ''
echo "Setting up OpenGL environment...";
export LD_LIBRARY_PATH="/run/opengl-driver/lib:/run/opengl-driver-32/lib";
'';
};
meta.sourceProvenance = with pkgs.lib.sourceTypes; [
fromSource
binaryBytecode # mitm cache
];
});
}