-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6bca908
commit 8d927db
Showing
8 changed files
with
4,066 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
node_modules | ||
dist | ||
result |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{ | ||
description = "A Gnome extension to mimic macOS's Rectangle tiling."; | ||
|
||
inputs = { | ||
nixpkgs.url = github:NixOS/nixpkgs/nixpkgs-unstable; | ||
flake-utils.url = github:numtide/flake-utils; | ||
|
||
gitignore.url = "github:hercules-ci/gitignore.nix"; | ||
gitignore.inputs.nixpkgs.follows = "nixpkgs"; | ||
}; | ||
|
||
outputs = { self, nixpkgs, flake-utils, gitignore }: | ||
flake-utils.lib.eachDefaultSystem (system: | ||
let | ||
inherit (gitignore.lib) gitignoreSource; | ||
pkgs = (import nixpkgs) { inherit system; }; | ||
nodejs = pkgs.nodejs; | ||
node2nixOutput = import ./nix { inherit pkgs nodejs system; }; | ||
nodeDeps = node2nixOutput.nodeDependencies; | ||
buildDependencies = with pkgs; [ | ||
busybox | ||
glib | ||
nodejs | ||
typescript | ||
zip | ||
]; | ||
in | ||
{ | ||
formatter = nixpkgs.legacyPackages.${system}.nixpkgs-fmt; | ||
packages.default = pkgs.stdenv.mkDerivation { | ||
name = "gnome-extensions-rectangle"; | ||
version = "master"; | ||
src = gitignoreSource ./.; | ||
nativeBuildInputs = buildDependencies; | ||
dontCheck = true; | ||
dontConfigure = true; | ||
dontFixup = true; | ||
buildPhase = '' | ||
runHook preBuild | ||
ln -sf ${nodeDeps}/lib/node_modules ./node_modules | ||
make pack | ||
runHook postBuild | ||
''; | ||
installPhase = '' | ||
runHook preInstall | ||
mkdir -p $out/share/gnome-shell/extensions/[email protected] | ||
unzip rectangle.zip -d $out/share/gnome-shell/extensions/[email protected] | ||
cp rectangle.zip $out/ | ||
runHook postInstall | ||
''; | ||
}; | ||
devShell = pkgs.mkShell { | ||
packages = buildDependencies; | ||
}; | ||
} | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# This file has been generated by node2nix 1.11.1. Do not edit! | ||
|
||
{pkgs ? import <nixpkgs> { | ||
inherit system; | ||
}, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-14_x"}: | ||
|
||
let | ||
nodeEnv = import ./node-env.nix { | ||
inherit (pkgs) stdenv lib python2 runCommand writeTextFile writeShellScript; | ||
inherit pkgs nodejs; | ||
libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null; | ||
}; | ||
in | ||
import ./node-package.nix { | ||
inherit (pkgs) fetchurl nix-gitignore stdenv lib fetchgit; | ||
inherit nodeEnv; | ||
} |
Oops, something went wrong.