From 3d6e66d3b921ea19323517e782efd7ed8074a365 Mon Sep 17 00:00:00 2001 From: Artemis Tosini Date: Sat, 16 Mar 2024 01:50:36 +0000 Subject: [PATCH] hactoolnet: add thing --- flake.lock | 12 ++--- flake.nix | 1 + packages/hactoolnet/default.nix | 30 +++++++++++ packages/hactoolnet/deps.nix | 90 +++++++++++++++++++++++++++++++++ packages/zephyr/sdk.nix | 4 +- 5 files changed, 129 insertions(+), 8 deletions(-) create mode 100644 packages/hactoolnet/default.nix create mode 100644 packages/hactoolnet/deps.nix diff --git a/flake.lock b/flake.lock index d83b542..ec40816 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1710097495, - "narHash": "sha256-B7Ea7q7hU7SE8wOPJ9oXEBjvB89yl2csaLjf5v/7jr8=", + "lastModified": 1710503106, + "narHash": "sha256-WQenjcuNH9cnEYqh/PFxpmjK9PQnEPGt1Z7TCfYBhXs=", "owner": "nixos", "repo": "nixpkgs", - "rev": "d40e866b1f98698d454dad8f592fe7616ff705a4", + "rev": "b1d47989352fcb722a1f19295a9461ed1ef8435a", "type": "github" }, "original": { @@ -42,11 +42,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1709126324, - "narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=", + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "d465f4819400de7c8d874d50b982301f28a84605", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 52b1077..704bfdb 100644 --- a/flake.nix +++ b/flake.nix @@ -40,6 +40,7 @@ attic = final.callPackage ./packages/attic { }; attic-client = final.attic.override { clientOnly = true; }; cups-dymo-patched = final.callPackage ./packages/cups-dymo { }; + hactoolnet = final.callPackage ./packages/hactoolnet { }; ipsw = final.callPackage ./packages/ipsw { }; jlink = final.callPackage ./packages/jlink { }; zephyrPackages = final.callPackage ./packages/zephyr { }; diff --git a/packages/hactoolnet/default.nix b/packages/hactoolnet/default.nix new file mode 100644 index 0000000..f6d4cdd --- /dev/null +++ b/packages/hactoolnet/default.nix @@ -0,0 +1,30 @@ +{ lib, buildDotnetModule, dotnetCorePackages, fetchFromGitHub }: + +buildDotnetModule rec { + pname = "hactoolnet"; + version = "0.19.0"; + + src = fetchFromGitHub { + owner = "Thealexbarney"; + repo = "LibHac"; + rev = "v${version}"; + hash = "sha256-aeIwVq0IyrelD23ZTNWsbwb1/gUugIqsINZ2hmWwtg0="; + }; + + dotnet-sdk = dotnetCorePackages.sdk_7_0; + dotnet-runtime = dotnetCorePackages.runtime_7_0; + + nugetDeps = ./deps.nix; + + projectFile = "src/hactoolnet/hactoolnet.csproj"; + + executables = [ "hactoolnet" ]; + + meta = with lib; { + homepage = "https://github.com/Thealexbarney/LibHac"; + description = + "Example program for LibHac, which implements parts of Horizon OS"; + license = licenses.mit; + platforms = platforms.unix; + }; +} diff --git a/packages/hactoolnet/deps.nix b/packages/hactoolnet/deps.nix new file mode 100644 index 0000000..c69509c --- /dev/null +++ b/packages/hactoolnet/deps.nix @@ -0,0 +1,90 @@ +# This file was automatically generated by passthru.fetch-deps. +# Please dont edit it manually, your changes might get overwritten! + +{ fetchNuGet }: [ + (fetchNuGet { + pname = "Microsoft.AspNetCore.App.Ref"; + version = "7.0.16"; + sha256 = "1nrk00w3jkb1r3m8zn7c05snan02b6s7n5s93aq2dl9kz0bm530c"; + }) + (fetchNuGet { + pname = "Microsoft.AspNetCore.App.Runtime.linux-arm64"; + version = "7.0.16"; + sha256 = "0g4zxka97q3bdc72yql296hx2laim5b4rfb8vxmknzdpzj0ydiks"; + }) + (fetchNuGet { + pname = "Microsoft.AspNetCore.App.Runtime.linux-x64"; + version = "7.0.16"; + sha256 = "0zy1zarikg4d1g06ax3zdjvfysw2393b9fgg7xnracqi17hr38ah"; + }) + (fetchNuGet { + pname = "Microsoft.AspNetCore.App.Runtime.osx-arm64"; + version = "7.0.16"; + sha256 = "1wgmbbn81rbqlx44hg9zqrrcmiinss1qhgfsq37vzy2i8ycyn59w"; + }) + (fetchNuGet { + pname = "Microsoft.AspNetCore.App.Runtime.osx-x64"; + version = "7.0.16"; + sha256 = "1ggcy57k31bxqk6k1hsbmzxkyly9bzch7dw7fgl2yx4a439nkh54"; + }) + (fetchNuGet { + pname = "Microsoft.Build.Tasks.Git"; + version = "1.1.1"; + sha256 = "1bb5p4zlnfn88skkvymxfsn0jybqncl4356hwnic9jxdq2d4fz1w"; + }) + (fetchNuGet { + pname = "Microsoft.NETCore.App.Host.linux-arm64"; + version = "7.0.16"; + sha256 = "0wxa2mm34l32324rywns3bphxrkxm265wxck93z030klwvxdalri"; + }) + (fetchNuGet { + pname = "Microsoft.NETCore.App.Host.linux-x64"; + version = "7.0.16"; + sha256 = "1xiq43br5lk1xa4d4wzhdpn9lz3mixmyxggzbsf4i4q5692rv35f"; + }) + (fetchNuGet { + pname = "Microsoft.NETCore.App.Host.osx-arm64"; + version = "7.0.16"; + sha256 = "0ln013191h2rkhm8xss4aqbb52ywp44rjfnn7pip99wdx66bkazs"; + }) + (fetchNuGet { + pname = "Microsoft.NETCore.App.Host.osx-x64"; + version = "7.0.16"; + sha256 = "1b8w278n8hcxysjs56ghx4pdbfall66nnmk1kx5a0my7lp7yp6xf"; + }) + (fetchNuGet { + pname = "Microsoft.NETCore.App.Ref"; + version = "7.0.16"; + sha256 = "19lnkab2p8nkfc4jag0whkv51v3qabwdyzjk6xgj61i6s8lnnz1f"; + }) + (fetchNuGet { + pname = "Microsoft.NETCore.App.Runtime.linux-arm64"; + version = "7.0.16"; + sha256 = "1qb3pk1kgvwjc2n4kqfx4bqjmaihjf8cd9cfkqkkwmnnw9jd7f83"; + }) + (fetchNuGet { + pname = "Microsoft.NETCore.App.Runtime.linux-x64"; + version = "7.0.16"; + sha256 = "1w41xwdikkyplxr1kqfn1fwjvbglgsaripgdglhdx9qdxgr3nfi3"; + }) + (fetchNuGet { + pname = "Microsoft.NETCore.App.Runtime.osx-arm64"; + version = "7.0.16"; + sha256 = "0xgd5nj5nx3w3m9cbh3b6r0c2w5svxjkslwqq35w445vjhq435fz"; + }) + (fetchNuGet { + pname = "Microsoft.NETCore.App.Runtime.osx-x64"; + version = "7.0.16"; + sha256 = "0mghc3ihk2j60yyrb57k200ddmhj5impl81lldpxxx9821pb0qha"; + }) + (fetchNuGet { + pname = "Microsoft.SourceLink.Common"; + version = "1.1.1"; + sha256 = "0xkdqs7az2cprar7jzjlgjpd64l6f8ixcmwmpkdm03fyb4s5m0bg"; + }) + (fetchNuGet { + pname = "Microsoft.SourceLink.GitHub"; + version = "1.1.1"; + sha256 = "099y35f2npvva3jk1zp8hn0vb9pwm2l0ivjasdly6y2idv53s5yy"; + }) +] diff --git a/packages/zephyr/sdk.nix b/packages/zephyr/sdk.nix index 24c6632..be25c1b 100644 --- a/packages/zephyr/sdk.nix +++ b/packages/zephyr/sdk.nix @@ -1,5 +1,5 @@ -{ lib, symlinkJoin, fetchurl, zephyrPackages, source, version, hosts, toolchains ? [ ] -}: +{ lib, symlinkJoin, fetchurl, zephyrPackages, source, version, hosts +, toolchains ? [ ] }: let src = fetchurl source; in symlinkJoin rec { pname = "zephyr-sdk";