Skip to content

Commit 1f4c1f5

Browse files
committed
pdc_tool: Create package
1 parent 9f1e42a commit 1f4c1f5

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

derivations/pdc_tool.nix

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
stdenv,
3+
lib,
4+
fetchzip,
5+
}:
6+
7+
let
8+
version = "0.3.0";
9+
10+
binaryArchive = {
11+
x86_64-linux = fetchzip {
12+
url = "https://github.com/HBehrens/pdc_tool/releases/download/v${version}/pdc_tool_linux_x86_64-unknown-linux-musl.zip";
13+
hash = "sha256-TGDV2/dwWpOu3xK9Lc5K15EiKrfL0pJKQR1VIlCqpmo=";
14+
};
15+
x86_64-darwin = fetchzip {
16+
url = "https://github.com/HBehrens/pdc_tool/releases/download/v${version}/pdc_tool_macos_x86_64-apple-darwin.zip";
17+
hash = "sha256-c/d6dYNHL0kDWqBPYvOkkg2XZAlSe8mVRLGM1ng/UkE=";
18+
};
19+
aarch64-darwin = fetchzip {
20+
url = "https://github.com/HBehrens/pdc_tool/releases/download/v${version}/pdc_tool_macos_aarch64-apple-darwin.zip";
21+
hash = "sha256-4MJJkb/kvmPlzdBs4KrdpcaMmUkD8Qyb03TgqC7OZ1Y=";
22+
};
23+
};
24+
in
25+
stdenv.mkDerivation {
26+
pname = "pdc_tool";
27+
inherit version;
28+
29+
src = binaryArchive.${stdenv.hostPlatform.system};
30+
31+
dontConfigure = true;
32+
dontBuild = true;
33+
34+
installPhase = ''
35+
mkdir -p $out/bin
36+
install -Dm755 pdc_tool $out/bin
37+
'';
38+
39+
meta = {
40+
description = "Command-line interface for working with Pebble Draw Command (PDC) files";
41+
homepage = "https://github.com/HBehrens/pdc_tool";
42+
platforms = [
43+
"aarch64-darwin"
44+
"x86_64-darwin"
45+
"x86_64-linux"
46+
];
47+
sourceProvenance = lib.sourceTypes.binaryNativeCode;
48+
};
49+
}

flake.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
arm-embedded-toolchain
6262
boost153
6363
pdc-sequencer
64+
pdc_tool
6465
pebble-qemu
6566
pebble-tool
6667
pypkjs
@@ -92,6 +93,7 @@
9293
arm-embedded-toolchain = final.callPackage ./derivations/arm-embedded-toolchain { };
9394
boost153 = final.callPackage ./derivations/boost153 { };
9495
pdc-sequencer = final.callPackage ./derivations/pdc-sequencer.nix { };
96+
pdc_tool = final.callPackage ./derivations/pdc_tool.nix { };
9597
pebble-qemu = final.callPackage ./derivations/pebble-qemu.nix { };
9698
pebble-tool = final.callPackage ./derivations/pebble-tool { };
9799
pypkjs = final.pebble-tool.passthru.pythonLibs.pypkjs;

0 commit comments

Comments
 (0)