mirror of
https://github.com/spacebarchat/client.git
synced 2024-11-21 18:02:32 +01:00
Add utility scripts
This commit is contained in:
parent
9f1a0e83e7
commit
922edcbb66
31
flake.lock
31
flake.lock
@ -20,41 +20,24 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681932375,
|
"lastModified": 1682258674,
|
||||||
"narHash": "sha256-tSXbYmpnKSSWpzOrs27ie8X3I0yqKA6AuCzCYNtwbCU=",
|
"narHash": "sha256-nSqXN+dBgw8+DeE3vBhdHB7C2p+2QBDsA27ZptjJz/Y=",
|
||||||
"owner": "nixos",
|
"owner": "lilyinstarlight",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "3d302c67ab8647327dba84fbdb443cdbf0e82744",
|
"rev": "47c77aa566f5114b4d759280702b9b910d3c7f0f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"owner": "lilyinstarlight",
|
||||||
"ref": "nixos-22.11",
|
"ref": "unheck/nodejs",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"pnpm2nix": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1676829786,
|
|
||||||
"narHash": "sha256-ywnp/Y20Bv62Vs4v39NezJ4irSg6IJUR+J25hBMu+yA=",
|
|
||||||
"owner": "TheArcaneBrony",
|
|
||||||
"repo": "pnpm2nix",
|
|
||||||
"rev": "65e000773abd988f1f0cb99ff592d7945e7dd349",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "TheArcaneBrony",
|
|
||||||
"repo": "pnpm2nix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs"
|
||||||
"pnpm2nix": "pnpm2nix"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"systems": {
|
"systems": {
|
||||||
|
22
flake.nix
22
flake.nix
@ -1,25 +1,29 @@
|
|||||||
{
|
{
|
||||||
description = "Spacebar client, written in React.";
|
description = "Spacebar client, written in React.";
|
||||||
|
|
||||||
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11";
|
#inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11";
|
||||||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||||
inputs.pnpm2nix.url = "github:TheArcaneBrony/pnpm2nix";
|
#inputs.pnpm2nix.url = "github:TheArcaneBrony/pnpm2nix";
|
||||||
#inputs.pnpm2nix.url = "path:/home/root@Rory/git/spacebar/client/pnpm2nix";
|
#inputs.pnpm2nix.url = "path:/home/root@Rory/git/spacebar/client/pnpm2nix";
|
||||||
inputs.pnpm2nix.flake = false;
|
#inputs.pnpm2nix.flake = false;
|
||||||
|
inputs.nixpkgs.url = "github:lilyinstarlight/nixpkgs/unheck/nodejs";
|
||||||
|
|
||||||
outputs = { self, nixpkgs, flake-utils, pnpm2nix }:
|
outputs = { self, nixpkgs, flake-utils }:
|
||||||
flake-utils.lib.eachDefaultSystem (system:
|
flake-utils.lib.eachDefaultSystem (system:
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
};
|
};
|
||||||
_pnpm2nix = import pnpm2nix { pkgs = nixpkgs.legacyPackages.${system}; };
|
#_pnpm2nix = import pnpm2nix { pkgs = nixpkgs.legacyPackages.${system}; };
|
||||||
in rec {
|
in rec {
|
||||||
packages.default = _pnpm2nix.mkPnpmPackage {
|
#packages.default = _pnpm2nix.mkPnpmPackage {
|
||||||
|
packages.default = pkgs.buildNpmPackage {
|
||||||
|
pname = "spacebar-client-react";
|
||||||
src = ./.;
|
src = ./.;
|
||||||
buildInputs = with pkgs; [
|
name = "spacebar-client-react";
|
||||||
|
#buildInputs = with pkgs; [ prefetch-npm-deps ];
|
||||||
];
|
npmDepsHash = "sha256-b/L2pEhqRYVDNg5jYBIahAdbSW4GLgVQEnwziDBprW8=";
|
||||||
|
makeCacheWritable = true;
|
||||||
};
|
};
|
||||||
devShell = pkgs.mkShell {
|
devShell = pkgs.mkShell {
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
|
37
flake.template.nix
Normal file
37
flake.template.nix
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
{
|
||||||
|
description = "Spacebar client, written in React.";
|
||||||
|
|
||||||
|
#inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11";
|
||||||
|
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
#inputs.pnpm2nix.url = "github:TheArcaneBrony/pnpm2nix";
|
||||||
|
#inputs.pnpm2nix.url = "path:/home/root@Rory/git/spacebar/client/pnpm2nix";
|
||||||
|
#inputs.pnpm2nix.flake = false;
|
||||||
|
inputs.nixpkgs.url = "github:lilyinstarlight/nixpkgs/unheck/nodejs";
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs, flake-utils }:
|
||||||
|
flake-utils.lib.eachDefaultSystem (system:
|
||||||
|
let
|
||||||
|
pkgs = import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
};
|
||||||
|
#_pnpm2nix = import pnpm2nix { pkgs = nixpkgs.legacyPackages.${system}; };
|
||||||
|
in rec {
|
||||||
|
#packages.default = _pnpm2nix.mkPnpmPackage {
|
||||||
|
packages.default = pkgs.buildNpmPackage {
|
||||||
|
pname = "spacebar-client-react";
|
||||||
|
src = ./.;
|
||||||
|
name = "spacebar-client-react";
|
||||||
|
#buildInputs = with pkgs; [ ];
|
||||||
|
npmDepsHash = "$NPM_HASH";
|
||||||
|
makeCacheWritable = true;
|
||||||
|
};
|
||||||
|
devShell = pkgs.mkShell {
|
||||||
|
buildInputs = with pkgs; [
|
||||||
|
nodejs
|
||||||
|
nodePackages.pnpm
|
||||||
|
nodePackages.typescript
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
3
nix-build-test.sh
Executable file
3
nix-build-test.sh
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
#nix build --update-input pnpm2nix --debugger --ignore-try
|
||||||
|
nix build --debugger --ignore-try --print-out-paths --print-build-logs --http2 "$@"
|
7
nix-rebuild-flake.sh
Executable file
7
nix-rebuild-flake.sh
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
#!/usr/bin/env nix-shell
|
||||||
|
#!nix-shell -i "bash -x" -p nodejs nodePackages.ts-node prefetch-npm-deps bash
|
||||||
|
rm -rfv package-lock.json
|
||||||
|
npm i --save --ignore-scripts
|
||||||
|
DEPS_HASH=`prefetch-npm-deps package-lock.json`
|
||||||
|
sed 's/$NPM_HASH/'${DEPS_HASH/\//\\\/}'/g' flake.template.nix > flake.nix
|
||||||
|
#sha256-5iurI8d2mael4qR/gs4IeZpf5d6+QPBoZ+kvhrwoOIU=
|
4065
package-lock.json
generated
4065
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user