-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
50 lines (47 loc) · 1.4 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
{
description = "";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
};
outputs = { self, nixpkgs }:
let
system = "x86_64-linux";
lib = nixpkgs.lib;
overlays = [ (final: prev: {
javy = pkgs.stdenv.mkDerivation {
name = "javy";
version = "1.4.0";
src = pkgs.fetchurl {
url = "https://github.com/bytecodealliance/javy/releases/download/v1.4.0/javy-x86_64-linux-v1.4.0.gz";
hash = "sha256-NZIzT8BdtgKiE3RbePWEY1E5TWe9mr2LSRhhmxzWzd8=";
};
nativeBuildInputs = with pkgs; [ gzip autoPatchelfHook ];
buildInputs = with pkgs; [ glib ];
unpackPhase = ''
cp $src src.gz
mkdir $out
${pkgs.gzip}/bin/gzip -c -d src.gz > $out/javy
'';
installPhase = ''
runHook preInstall
install -m755 -D $out/javy $out/bin/javy
runHook postInstall
'';
meta = with lib; {
platforms = platforms.linux;
};
};
}) ];
pkgs = import nixpkgs { inherit system overlays; };
in
{
packages = {
};
# defaultPackage = example;
devShell.${system} = pkgs.mkShell {
packages = with pkgs; [ nodejs_18 go gopls javy esbuild nodePackages.typescript-language-server wasmtime ];
shellHook = ''
'';
};
};
}