-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathflake.nix
More file actions
59 lines (53 loc) · 1.54 KB
/
flake.nix
File metadata and controls
59 lines (53 loc) · 1.54 KB
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
{
description = "icyproxy";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
overlays = [];
pkgs = import nixpkgs {
inherit system overlays;
};
rev = if (self ? shortRev) then self.shortRev else "dev";
icyproxy = pkgs.buildGoModule {
pname = "icyproxy";
version = rev;
src = pkgs.lib.cleanSource self;
vendorHash = null;
};
in
with pkgs;
{
devShells.default = pkgs.mkShell {
buildInputs = [
pkgs.go
pkgs.gopls
pkgs.skopeo
];
GOTOOLCHAIN = "local";
shellHook = ''
export GOPATH="$(realpath .)/.go";
export PATH="''\${GOPATH}/bin:''\${PATH}"
'';
};
packages.default = icyproxy;
packages.dockerImage = pkgs.dockerTools.streamLayeredImage {
name = "icyproxy";
contents = [
icyproxy
pkgs.dockerTools.caCertificates
];
config = {
Labels = {
"org.opencontainers.image.source" = "https://github.com/abustany/icyproxy";
"org.opencontainers.image.description" = "Reverse proxy to Inject ICY metadata into audio streams";
"org.opencontainers.image.licenses" = "MIT";
};
};
};
}
);
}