-
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.
Format nix flake and add installation.md
- Loading branch information
1 parent
429533f
commit 9f46e35
Showing
5 changed files
with
78 additions
and
53 deletions.
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
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,27 +1,32 @@ | ||
{pkgs, lib, ...}: let | ||
buildExtension = pkgs.mkYarnPackage rec { | ||
name = "browser_terminal"; | ||
version = "1.4.2"; | ||
{ | ||
pkgs, | ||
lib, | ||
... | ||
}: let | ||
buildExtension = pkgs.mkYarnPackage rec { | ||
name = "browser_terminal"; | ||
version = "1.4.2"; | ||
|
||
src = ./.; | ||
src = ./.; | ||
|
||
offlineCache = pkgs.fetchYarnDeps { | ||
yarnLock = src + "/yarn.lock"; | ||
hash = "sha256-pUnvLSdyd46205YDMDIYXw7P94IvgBgHDJ+k5FzIm6E="; | ||
}; | ||
offlineCache = pkgs.fetchYarnDeps { | ||
yarnLock = src + "/yarn.lock"; | ||
hash = "sha256-pUnvLSdyd46205YDMDIYXw7P94IvgBgHDJ+k5FzIm6E="; | ||
}; | ||
|
||
buildPhase = '' | ||
export HOME=$(mktemp -d) | ||
mkdir -p $out/unpacked-firefox | ||
buildPhase = '' | ||
export HOME=$(mktemp -d) | ||
mkdir -p $out/unpacked-firefox | ||
# firefox | ||
yarn --offline build | ||
cp -r deps/${name}/dist $out/unpacked-firefox | ||
mv deps/${name}/web-ext-artifacts/${name}-${version}.zip $out/firefox-${name}-${version}.zip | ||
# firefox | ||
yarn --offline build | ||
cp -r deps/${name}/dist $out/unpacked-firefox | ||
mv deps/${name}/web-ext-artifacts/${name}-${version}.zip $out/firefox-${name}-${version}.zip | ||
# chromium | ||
yarn --offline build:chromium | ||
mv deps/${name}/web-ext-artifacts/${name}-${version}.zip $out/chromium-${name}-${version}.zip | ||
''; | ||
}; | ||
in buildExtension | ||
# chromium | ||
yarn --offline build:chromium | ||
mv deps/${name}/web-ext-artifacts/${name}-${version}.zip $out/chromium-${name}-${version}.zip | ||
''; | ||
}; | ||
in | ||
buildExtension |
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,29 +1,32 @@ | ||
{ | ||
inputs = { | ||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
}; | ||
|
||
outputs = { self, nixpkgs, flake-utils, ... }: | ||
flake-utils.lib.eachDefaultSystem (system: | ||
let | ||
outputs = { | ||
nixpkgs, | ||
flake-utils, | ||
... | ||
}: | ||
flake-utils.lib.eachDefaultSystem ( | ||
system: let | ||
pkgs = import nixpkgs { | ||
inherit system; | ||
inherit system; | ||
}; | ||
in | ||
with pkgs; | ||
rec { | ||
devShells.default = mkShell { | ||
buildInputs = [ | ||
go | ||
nodePackages.pnpm | ||
nodePackages.web-ext | ||
esbuild | ||
]; | ||
}; | ||
with pkgs; { | ||
devShells.default = mkShell { | ||
buildInputs = [ | ||
go | ||
nodePackages.pnpm | ||
nodePackages.web-ext | ||
esbuild | ||
]; | ||
}; | ||
|
||
packages.native = callPackage ./native.nix { }; | ||
packages.default = callPackage ./build.nix { }; | ||
} | ||
packages.native = callPackage ./native.nix {}; | ||
packages.default = callPackage ./build.nix {}; | ||
} | ||
); | ||
} | ||
} |
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,14 @@ | ||
# Installation | ||
|
||
1. Install extension from [firefox addons](https://addons.mozilla.org/en-US/firefox/addon/browser_terminal/) or [chrome web store](https://chrome.google.cm/webstore/detail/browser-terminal/nbnfihffeffdhcbblmekelobgmdccfnl) | ||
|
||
2. Download native program from https://github.com/ayes-web/browser_terminal/releases | ||
3. Installing the binary | ||
- Linux: ``sudo mv ~/Downloads/browser_terminal_linux_x86_64 /usr/local/bin/browser_terminal`` | ||
- MacOS: ``sudo mv ~/Downloads/browser_terminal_macos_aarch64 /usr/local/bin/browser_terminal`` | ||
4. Install the native manifest: ```browser_terminal --install``` | ||
|
||
Done! | ||
|
||
# Nix users | ||
Nix users on linux and macos can take advantage of the flake in the repo to install the binary (`nix run github:/ayes-web/browser_terminal#native`) |
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,13 +1,14 @@ | ||
{ pkgs, buildGoModule, lib }: buildGoModule rec { | ||
src = ./native; | ||
{buildGoModule}: | ||
buildGoModule { | ||
src = ./native; | ||
|
||
name = "github.com/ayes-web/browser_terminal"; | ||
vendorSha256 = "sha256-WUQHf1LuD3YqaUDSmKaimnIa6pfKqvjf257pDO3P9KQ="; | ||
name = "browser_terminal"; | ||
vendorSha256 = "sha256-WUQHf1LuD3YqaUDSmKaimnIa6pfKqvjf257pDO3P9KQ="; | ||
|
||
GOFLAGS = "-trimpath"; | ||
GOFLAGS = "-trimpath"; | ||
|
||
ldflags = [ | ||
"-s" | ||
"-w" | ||
]; | ||
} | ||
ldflags = [ | ||
"-s" | ||
"-w" | ||
]; | ||
} |