-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathflake.nix
More file actions
53 lines (49 loc) · 1.9 KB
/
flake.nix
File metadata and controls
53 lines (49 loc) · 1.9 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
{
description = "A Flake For Skyrim Accessibility Mod By Dio Kyrie";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
papyrus-compiler.url = "github:DioKyrie-Git/papyrus-compiler";
};
outputs = { self, nixpkgs, flake-utils, papyrus-compiler }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
system = system;
config.allowUnfree = true;
config.microsoftVisualStudioLicenseAccepted = true;
};
in
{
packages.default = pkgs.stdenv.mkDerivation {
pname = "SkyrimAccessibility";
version = "0.8.0";
# Sources
src = (./.);
sourceRoot = "pname"; # Build starts in parent directory of all source directories.
buildPhase = ''
xmake build
'';
nativeBuildInputs = with pkgs; [
#git
papyrus-compiler.packages.${system}.default
#xmake
];
};
# Development shell with tools for hacking on the package
# Enter with `nix develop`
devShells.default = pkgs.mkShell {
inputsFrom = [ self.packages.${system}.default ];
shellHook = ''
export PS1="$PS1[nix develop]:"
echo "Welcome to the dev shell."
echo "Build the package with: nix build .#default"
'';
};
});
}
#xmake f -p windows --arch=x86_64 --toolchain=clang-cl --sdk="$(which clang-cl)" --cc="$(which clang-cl)" --cxx="$(which clang-cl)" --ldflags="-fuse-ld=lld"
#xmake build
# nix build -f flake.nix
# Use command bellow to compile .psc files. Update to include 2 outpus and multiple header folders.
# papyrus-compiler compile -h "/home/cubozoa/Games/Skyrim Special Edition/Data/Scripts/Source/" -i "./Skyrim Data/Scripts/Source/" -o "./Skyrim Data/Scripts/"