-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
36 lines (29 loc) · 802 Bytes
/
Copy pathflake.nix
File metadata and controls
36 lines (29 loc) · 802 Bytes
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
{
description = "A very basic flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
};
outputs = { self, nixpkgs }: let pkgs = nixpkgs.legacyPackages.x86_64-linux;
in {
packages.x86_64-linux.fixJuliaPkgs = pkgs.writeScriptBin "fixJuliaPkgs" ''
#!/usr/bin/env bash
PKG_DIR=~/.julia/
for ARTIFACT in $(find $PKG_DIR/artifacts/*/bin)
do
chmod +w $ARTIFACT
${pkgs.patchelf}/bin/patchelf \
$ARTIFACT \
--set-interpreter \
"$(cat $NIX_CC/nix-support/dynamic-linker)"
chmod -w $ARTIFACT
done
'';
devShell.x86_64-linux = pkgs.mkShell{
buildInputs = with pkgs; [
file
julia-bin
self.packages.x86_64-linux.fixJuliaPkgs
];
};
};
}