add nixshells
This commit is contained in:
parent
f986493354
commit
2b8e14423c
@ -9,7 +9,9 @@ in
|
||||
SDL2.dev
|
||||
SDL2_image
|
||||
SDL2_gfx
|
||||
#SDL2_image.dev
|
||||
sqlite
|
||||
sqlite.dev
|
||||
libconfig
|
||||
];
|
||||
nativeBuildInputs = with pkgs; [
|
||||
pkg-config
|
||||
|
8
.config/nixshell/cpp.nix
Normal file
8
.config/nixshell/cpp.nix
Normal file
@ -0,0 +1,8 @@
|
||||
let
|
||||
pkgs = import <nixpkgs> {};
|
||||
in
|
||||
pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
cmake
|
||||
];
|
||||
}
|
23
.config/nixshell/cypress-overlay.nix
Normal file
23
.config/nixshell/cypress-overlay.nix
Normal file
@ -0,0 +1,23 @@
|
||||
|
||||
# When Cypress starts, it copies some files into `~/.config/Cypress/cy/production/browsers/chrome-stable/interactive/CypressExtension/`
|
||||
# from the Nix Store, one of which it attempts to modify immediately after.
|
||||
# As-is, this fails because the copied file keeps the read-only flag it had in
|
||||
# the Store.
|
||||
# Luckily, the code responsible is a plain text script that we can easily patch:
|
||||
final: prev: {
|
||||
cypress = prev.cypress.overrideAttrs (oldAttrs: {
|
||||
installPhase = let
|
||||
old = "copyExtension(pathToExtension, extensionDest)";
|
||||
# This has only been tested against Cypress 6.0.0!
|
||||
newForChrome =
|
||||
"copyExtension(pathToExtension, extensionDest).then(() => fs_1.default.chmodAsync(extensionBg, 0o0644))";
|
||||
newForFirefox =
|
||||
"copyExtension(pathToExtension, extensionDest).then(() => fs.chmodAsync(extensionBg, 0o0644))";
|
||||
in ''
|
||||
sed -i 's/${old}/${newForChrome}/' \
|
||||
./resources/app/packages/server/lib/browsers/chrome.js
|
||||
sed -i 's/${old}/${newForFirefox}/' \
|
||||
./resources/app/packages/server/lib/browsers/utils.js
|
||||
'' + oldAttrs.installPhase;
|
||||
});
|
||||
}
|
9
.config/nixshell/go.nix
Normal file
9
.config/nixshell/go.nix
Normal file
@ -0,0 +1,9 @@
|
||||
let
|
||||
pkgs = import <nixpkgs> {};
|
||||
unstable = import <unstable> {};
|
||||
in
|
||||
pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
go
|
||||
];
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
with (import <nixpkgs> {});
|
||||
mkShell {
|
||||
buildInputs = [
|
||||
let pkgs = import <nixpkgs> { overlays = [ (import ./cypress-overlay.nix) ]; };
|
||||
in pkgs.mkShell {
|
||||
name = "matrix-shell";
|
||||
buildInputs = with pkgs; [
|
||||
yarn
|
||||
docker
|
||||
act
|
||||
@ -16,6 +17,7 @@ mkShell {
|
||||
xorg.libXtst
|
||||
xorg.xauth
|
||||
xvfb-run
|
||||
(with dotnetCorePackages; combinePackages [ sdk_5_0 ])
|
||||
stdenv.cc.cc zlib glib dbus gtk3 atk pango freetype
|
||||
fontconfig gdk-pixbuf cairo cups expat libgpg-error alsa-lib nspr nss
|
||||
xorg.libXrender xorg.libX11 xorg.libXext xorg.libXdamage xorg.libXtst
|
||||
@ -29,6 +31,9 @@ mkShell {
|
||||
shellHook = ''
|
||||
export NAME="matrix-shell"
|
||||
export NODE_OPTIONS=--openssl-legacy-provider
|
||||
export CYPRESS_INSTALL_BINARY=0
|
||||
export CYPRESS_RUN_BINARY=${pkgs.cypress}/bin/Cypress
|
||||
'';
|
||||
}
|
||||
|
||||
#https://gist.github.com/r-k-b/2485f977b476aa3f76a47329ce7f9ad4?permalink_comment_id=4402925
|
||||
|
10
.config/nixshell/node.nix
Normal file
10
.config/nixshell/node.nix
Normal file
@ -0,0 +1,10 @@
|
||||
with (import <nixpkgs> {});
|
||||
mkShell {
|
||||
buildInputs = [
|
||||
yarn
|
||||
nodejs
|
||||
nodePackages.npm
|
||||
nodePackages.nodemon
|
||||
];
|
||||
}
|
||||
|
7
.config/nixshell/postgresql.nix
Normal file
7
.config/nixshell/postgresql.nix
Normal file
@ -0,0 +1,7 @@
|
||||
with import <nixpkgs> {};
|
||||
mkShell {
|
||||
buildInputs = [
|
||||
postgresql
|
||||
];
|
||||
}
|
||||
|
15
.config/nixshell/react.nix
Normal file
15
.config/nixshell/react.nix
Normal file
@ -0,0 +1,15 @@
|
||||
with (import <nixpkgs> {});
|
||||
mkShell {
|
||||
buildInputs = [
|
||||
yarn
|
||||
nodejs
|
||||
] ++ (with pkgs.nodePackages; [
|
||||
npm
|
||||
nodemon
|
||||
]);
|
||||
shellHook = ''
|
||||
export NAME="react-shell"
|
||||
export NODE_OPTIONS=--openssl-legacy-provider
|
||||
'';
|
||||
}
|
||||
|
14
.config/nixshell/rust.nix
Normal file
14
.config/nixshell/rust.nix
Normal file
@ -0,0 +1,14 @@
|
||||
let
|
||||
pkgs = import <nixpkgs> {};
|
||||
unstable = import <unstable> {};
|
||||
in
|
||||
pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
unstable.rustc
|
||||
cargo
|
||||
libressl
|
||||
];
|
||||
nativeBuildInputs = with pkgs; [
|
||||
pkg-config
|
||||
];
|
||||
}
|
24
.config/nixshell/vuejs.nix
Normal file
24
.config/nixshell/vuejs.nix
Normal file
@ -0,0 +1,24 @@
|
||||
with (import <nixpkgs> {});
|
||||
let
|
||||
vueCli = pkgs.fetchFromGitHub {
|
||||
owner = "vuejs";
|
||||
repo = "vue-cli";
|
||||
rev = "v4.5.15";
|
||||
sha256 = "sha256-zJhk7tZAjqGLQOSTs3t5pj5qNtwersItGUM2oD4/R8o=";
|
||||
};
|
||||
in mkShell {
|
||||
buildInputs = [
|
||||
yarn
|
||||
nodejs
|
||||
vueCli
|
||||
] ++ (with pkgs.nodePackages; [
|
||||
npm
|
||||
nodemon
|
||||
]);
|
||||
shellHook = ''
|
||||
export NAME="vue-shell"
|
||||
export PATH=$(yarn bin):$PATH
|
||||
|
||||
'';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user