Skip to content

Commit

Permalink
build(nix): nixified the project
Browse files Browse the repository at this point in the history
  • Loading branch information
Guusvanmeerveld committed Feb 28, 2024
1 parent 31f425d commit e5390a5
Show file tree
Hide file tree
Showing 5 changed files with 14,393 additions and 8,204 deletions.
56 changes: 56 additions & 0 deletions flake.lock

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

70 changes: 70 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
description = "Dust-Mail client";

inputs = {
systems.url = "github:nix-systems/default";
flake-compat.url = "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz";
};

outputs =
{ systems
, nixpkgs
, ...
} @ inputs:

let
eachSystem = f:
nixpkgs.lib.genAttrs (import systems) (
system:
f nixpkgs.legacyPackages.${system}
);

# package = builtins.fromJSON (builtins.readFile "./package.json");

buildInputs = pkgs: with pkgs;
[
# You can set the major version of Node.js to a specific one instead
# of the default version
nodejs_20

nodePackages.npm
yarn

nodePackages.typescript
nodePackages.typescript-language-server
];

in
{
devShells = eachSystem
(pkgs: {
default = pkgs.mkShell
{
buildInputs = buildInputs pkgs;
};
});

packages = eachSystem
(pkgs: {
default = pkgs.buildNpmPackage
{
pname = "dust-mail-web";
version = "1.0.2";

src = ./.;

npmDepsHash = "sha256-+ILACZEyev4sZDw/kuQl6RGhWGKYCHJvbMuOIUvOGk0=";

npmFlags = [ "--legacy-peer-deps" ];

buildInputs = buildInputs pkgs;

buildPhase = ''npm run build'';

installPhase = '''';
};

});
};

}
Loading

0 comments on commit e5390a5

Please sign in to comment.