-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathflake.nix
More file actions
47 lines (45 loc) · 1.63 KB
/
Copy pathflake.nix
File metadata and controls
47 lines (45 loc) · 1.63 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
{
description = "A very basic flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
utils.url = "github:numtide/flake-utils";
nix-wrangle-pkg = { url = "github:timbertson/nix-wrangle"; flake = false; };
opam2nix-pkg = { url = "github:timbertson/opam2nix"; flake = false; };
};
outputs = { self, nixpkgs, utils, nix-wrangle-pkg, opam2nix-pkg }:
utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs { inherit system; };
# nix-wrangle = import nix-wrangle-pkg { pkgs = pkgs; };
# opam2nix = import opam2nix-pkg { inherit pkgs; inherit nix-wrangle; };
# some symlink/relative path shenanigans happening 🤷
esy = pkgs.writeShellScriptBin "esy" "${pkgs.nodePackages.esy}/lib/node_modules/.bin/esy $@";
in
rec {
packages = {
discopotty = pkgs.callPackage ./. { inherit pkgs; };
docker = pkgs.dockerTools.buildImage {
name = "discopotty";
config = {
Cmd = [ "${packages.discopotty}/bin/discopotty" ];
};
};
};
defaultPackage = packages.discopotty;
apps = {
discopotty = utils.lib.mkApp { drv = packages.discopotty; };
};
defaultApp = apps.discopotty;
devShell = pkgs.mkShell {
nativeBuildInputs = with pkgs; [ pkg-config ];
buildInputs = with pkgs; [
esy
ffmpeg
youtube-dl
opam
];
};
}
);
}