Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ brew tap ruimarinho/tap
brew install gsts
```

### nix flakes

```shell
nix shell github:ruimarinho/gsts
```

### Other Platforms

Install the package via `npm`:
Expand Down
77 changes: 77 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

59 changes: 59 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
description = "gsts: AWS STS credentials via Google Workspace";

inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:nixos/nixpkgs";
npmlock2nixSrc = {
url = "github:nix-community/npmlock2nix";
flake = false;
};
};

outputs = { self, nixpkgs, npmlock2nixSrc, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
config.permittedInsecurePackages = [
"nodejs-16.20.2"
];
};

npmlock2nix = import npmlock2nixSrc { inherit pkgs; lib = pkgs.lib; };

in rec {
packages.gsts = npmlock2nix.v2.build {
src = ./.;
installPhase = ''
mkdir -p $out/bin
cp -r * $out
ln -sf $out/index.js $out/bin/gsts
'';

node_modules_attrs = {
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD = 1;
};

buildCommands = [];
};

defaultPackage = self.packages.${system}.gsts;

overlays = final: prev: {
inherit (packages) gsts;
};

devShell = pkgs.mkShell {

CHROMIUM_PATH = "${pkgs.chromium}/bin/chromium";

packages = [
defaultPackage
pkgs.chromium
];
};
}
);
}