From 582be4ecc2bc381589e5624a07e369150655a4e1 Mon Sep 17 00:00:00 2001 From: IceDBorn <51162078+IceDBorn@users.noreply.github.com> Date: Mon, 18 Nov 2024 22:11:04 +0200 Subject: [PATCH 1/2] feat(nixos): add flake support (#12) --- README.md | 29 +++++++++++++++++++++++++++++ flake.nix | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 flake.nix diff --git a/README.md b/README.md index 096d5c8..6c42bd1 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,35 @@ To get started with Falkor, follow these steps: - `VITE_RD_CLIENT_ID`: Open source app RD client ID found in the Real Debrid documentation (https://api.real-debrid.com/) +### NixOS Flakes + +```nix +# flake.nix + +{ + inputs.falkor.url = "github:Team-Falkor/app"; + # ... + + outputs = {nixpkgs, falkor, ...} @ inputs: { + nixosConfigurations.HOSTNAME = nixpkgs.lib.nixosSystem { + specialArgs = { inherit inputs; }; # this is the important part + modules = [ + ./configuration.nix + ]; + }; + } +} + +# configuration.nix + +{inputs, pkgs, ...}: { + environment.systemPackages = with pkgs; [ + inputs.falkor.packages.${pkgs.system}.default + # ... + ]; +} +``` + ## Contributing We welcome contributions to Falkor! If you are looking for ways to contribute, here are some options: diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..e3b97b4 --- /dev/null +++ b/flake.nix @@ -0,0 +1,51 @@ +{ + description = "Electron-based gaming hub"; + + outputs = + { self, nixpkgs }: + let + forAllSystems = nixpkgs.lib.genAttrs systems; + pkgsFor = nixpkgs.legacyPackages; + systems = [ "x86_64-linux" ]; + in + { + packages = forAllSystems (system: { + default = + with pkgsFor.${system}; + stdenvNoCC.mkDerivation (finalAttrs: { + pname = "falkor"; + version = "0.0.92"; + + src = fetchurl { + url = "https://github.com/Team-Falkor/app/releases/download/v${finalAttrs.version}/falkor.deb"; + hash = "sha256-yDpYu2ehrRQuD29jcyTQla2R2IT1zfBDeWDDRnmqc8Y="; + }; + + unpackPhase = '' + runHook preUnpack + dpkg -x $src ./ + runHook postUnpack + ''; + + nativeBuildInputs = [ + makeWrapper + dpkg + ]; + + installPhase = '' + runHook preInstall + + mkdir -p $out/bin + mv usr/share $out/share + sed -i "s|Exec=.*|Exec=$out/bin/falkor|" $out/share/applications/*.desktop + mv opt/falkor $out/opt + makeWrapper ${lib.getExe electron} $out/bin/falkor \ + --argv0 "falkor" \ + --add-flags "$out/opt/resources/app.asar" \ + + runHook postInstall + ''; + }); + }); + }; +} From b7fc167580a906ad433f6e063c790f4289de6824 Mon Sep 17 00:00:00 2001 From: Prostarz Date: Tue, 19 Nov 2024 22:13:21 +0000 Subject: [PATCH 2/2] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 38 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 29 +++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..4132f7c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,38 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + + + +### Bug Description + + +### Steps to Reproduce + +1. +2. +3. + +### Expected Behavior + + +### Actual Behavior + + +### Screenshots or Logs + + +```plaintext +Logs go here diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..a16bae9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,29 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + + + +### Feature Description + + +### Problem Statement + + +### Proposed Solution + + +### Alternatives Considered + + +### Additional Context +