blob: ce20923bf3f6d79757bf3170623743118ab380c1 (
plain)
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
|
{
inputs = {
teleia.url = "github:lcolonq/teleia";
nixpkgs.follows = "teleia/nixpkgs";
};
outputs = inputs@{ self, nixpkgs, ... }:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
kharcho = inputs.teleia.native.build ./. "kharcho";
wasm = inputs.teleia.wasm.build ./. "kharcho";
nonnix = pkgs.stdenv.mkDerivation {
name = "kharcho-nonnix";
phases = [ "installPhase" ];
installPhase = ''
mkdir $out
cp -rv ${kharcho}/bin/kharcho_bin $out/kharcho
chmod +w $out/kharcho
patchelf --remove-rpath $out/kharcho
patchelf --set-interpreter /lib64/ld-linux-x86-64.so.2 $out/kharcho
strip $out/kharcho
chmod -w $out/kharcho
'';
};
in {
packages.${system} = {
inherit kharcho wasm nonnix;
default = kharcho;
};
applications.${system}.default = {
type = "app";
program = "${kharcho}/bin/kharcho";
};
devShells.${system}.default = inputs.teleia.shell.overrideAttrs (final: prev: {
buildInputs = prev.buildInputs;
});
};
}
|