Skip to content

Commit 9b467e5

Browse files
committed
add nix flake
1 parent 594bec3 commit 9b467e5

2 files changed

Lines changed: 87 additions & 0 deletions

File tree

flake.lock

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
{
2+
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
3+
4+
outputs = {nixpkgs, ...}: let
5+
forAllSystems = nixpkgs.lib.genAttrs [
6+
"aarch64-linux"
7+
"x86_64-linux"
8+
];
9+
in {
10+
packages = forAllSystems (system: rec {
11+
default = oodle;
12+
oodle = nixpkgs.legacyPackages.${system}.callPackage ({
13+
stdenv,
14+
cmake,
15+
git,
16+
fetchFromGitHub,
17+
enableStatic ? stdenv.hostPlatform.isStatic,
18+
lib,
19+
}:
20+
stdenv.mkDerivation rec {
21+
pname = "oodle";
22+
version = "2.9.16";
23+
src = ./.;
24+
25+
nativeBuildInputs = [
26+
cmake
27+
git
28+
];
29+
30+
cmakeFlags = [
31+
"-S ${src}/build"
32+
"-DFETCHCONTENT_SOURCE_DIR_SMAKE=${fetchFromGitHub {
33+
owner = "WorkingRobot";
34+
repo = "smake";
35+
rev = "ab947d3000e8f7d0b188118b4205db521449cdd0";
36+
sha256 = "sha256-kkjYOFZkBhstQ+YKtr5k5vwRriUfIuT3LVqKBg5YM3s=";
37+
}}"
38+
];
39+
40+
installPhase = ''
41+
runHook preInstall
42+
43+
mkdir -p $out
44+
45+
cp -r ar $out
46+
cp -r lib $out
47+
cp -r bin $out
48+
49+
runHook postInstall
50+
'';
51+
52+
meta = {
53+
description = "Oodle is a family of data compression solutions with incredible world-beating performance.";
54+
homepage = "https://www.radgametools.com/oodle.htm";
55+
platforms = ["x86_64-linux" "aarch64-linux"];
56+
mainProgram = "ozip";
57+
};
58+
}) {};
59+
});
60+
};
61+
}

0 commit comments

Comments
 (0)