nix flake!

This commit is contained in:
Murphy 2025-03-22 01:16:36 -04:00
commit fa441a2e97
Signed by: freya
GPG key ID: 9FBC6FFD6D2DBF17
4 changed files with 117 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
result

61
flake.lock Normal file
View file

@ -0,0 +1,61 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1742620533,
"narHash": "sha256-Q8xXg7/MQHiDjK1W2vwKZQOQUPvDO4ueXC463p/rPEg=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d8568f0f2bbbe1d391e36c8ee5fb50bade7839fe",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "master",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

17
flake.nix Normal file
View file

@ -0,0 +1,17 @@
{
description = "The Unofficial Homestuck Collection Client for NixOS";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/master";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { nixpkgs, flake-utils, ... }@inputs:
flake-utils.lib.eachSystem [ "x86_64-linux" ] (system: let
pkgs = nixpkgs.legacyPackages.${system};
in rec {
packages.unofficial-homestuck-collection = pkgs.callPackage ./unofficial-homestuck-collection.nix {};
legacyPackages = packages;
defaultPackage = packages.unofficial-homestuck-collection;
});
}

View file

@ -0,0 +1,38 @@
{ pkgs ? import <nixpkgs> { }
, stdenv ? pkgs.stdenv
, lib ? stdenv.lib
, appimageTools ? pkgs.appimageTools
, fetchurl ? pkgs.fetchurl
}:
let
pname = "unofficial-homestuck-collection";
version = "2.5.6";
src = fetchurl {
url = "https://github.com/GiovanH/unofficial-homestuck-collection/releases/download/v${version}/The-Unofficial-Homestuck-Collection-${version}.AppImage";
hash = "sha256-DR5tdLgABW/fvMkPzV5tUfWyXe3ie5Pgo1RndFXUxlo=";
};
appimageContents = appimageTools.extractType1 { inherit pname src; };
in
appimageTools.wrapType2 rec {
inherit pname version src;
extraInstallCommands = ''
sed -i 's/$@"/$@" --no-sandbox/' "$out/bin/unofficial-homestuck-collection"
'';
meta = {
description = "An offline collection of Homestuck and its related works. ";
homepage = "https://github.com/GiovanH/unofficial-homestuck-collection";
downloadPage = "https://github.com/GiovanH/unofficial-homestuck-collection/releases";
license = lib.licenses.gpl3Plus;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
maintainers = [{
name = "Freya Murphy";
email = "contact@freyacat.org";
}];
platforms = [ "x86_64-linux" ];
};
}