wip build

This commit is contained in:
Henry Hiles 2025-08-10 12:42:50 -04:00
commit 3ae912d420
No known key found for this signature in database
11 changed files with 3002 additions and 1 deletions

60
flake.nix Normal file
View file

@ -0,0 +1,60 @@
{
inputs = {
flake-parts.url = "github:hercules-ci/flake-parts";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs = inputs:
inputs.flake-parts.lib.mkFlake {inherit inputs;} {
systems = ["x86_64-linux" "aarch64-linux"];
perSystem = {
lib,
pkgs,
system,
...
}: {
_module.args.pkgs = import inputs.nixpkgs {inherit system;};
packages.default = pkgs.stdenv.mkDerivation {
pname = "auto-rotate";
version = "1.0.0";
src = ./.;
nativeBuildInputs = with pkgs; [nodejs glib.dev typescript zip];
buildPhase = ''
npm install
tsc
'';
installPhase = ''
cp -r dist/* $out/
cp metadata.json $out/
'';
meta = {
homepage = "https://git.federated.nexus/Henry-Hiles/auto-rotate";
description = "An extension to automatically rotate the screen when a window is fullscreened, useful for GNOME Shell Mobile.";
license = lib.licenses.gpl3Only;
maintainers = [lib.maintainers.quadradical];
};
};
# apps.build = {
# type = "app";
# program = pkgs.writeShellApplication {
# name = "build";
# runtimeInputs = ;
# text = let
# name = "auto-rotate";
# in ''
# npm install
# tsc
# cp metadata.json dist/
# env -C dist zip ../${name}.zip -9r .
# '';
# };
# };
};
};
}