Compare commits

...

2 commits

Author SHA1 Message Date
Bailey Stevens 3d8c6bbe52 Adds overlay. 2023-09-24 13:21:22 -04:00
Bailey Stevens 08f64404ba Adds package build. 2023-09-24 13:05:52 -04:00
5 changed files with 76 additions and 14 deletions

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
node_modules
dist
result

8
default.nix Normal file
View file

@ -0,0 +1,8 @@
{napalm, ... }:
napalm.buildPackage ./. {
name = "melodies-frontend";
npmCommands = [ "npm install" "npm run build" ];
installPhase = ''
mv dist $out
'';
}

View file

@ -18,23 +18,62 @@
"type": "github"
}
},
"nixpkgs": {
"flake-utils_2": {
"locked": {
"lastModified": 1694948089,
"narHash": "sha256-d2B282GmQ9o8klc22/Rbbbj6r99EnELQpOQjWMyv0rU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5148520bfab61f99fd25fb9ff7bfbb50dad3c9db",
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"napalm": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1693989153,
"narHash": "sha256-gx39Y3opGB25+44OjM+h1bdJyzgLD963va8ULGYlbhM=",
"owner": "nix-community",
"repo": "napalm",
"rev": "a8215ccf1c80070f51a92771f3bc637dd9b9f7ee",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "napalm",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1695416179,
"narHash": "sha256-610o1+pwbSu+QuF3GE0NU5xQdTHM3t9wyYhB9l94Cd8=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "715d72e967ec1dd5ecc71290ee072bcaf5181ed6",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"napalm": "napalm",
"nixpkgs": "nixpkgs"
}
},

View file

@ -2,18 +2,34 @@
description = "xenon-browser";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
flake-utils.url = "github:numtide/flake-utils";
napalm.url = "github:nix-community/napalm";
napalm.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, flake-utils }:
outputs = inputs@{ self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem
(system:
let
pkgs = nixpkgs.legacyPackages.${system};
pkgs = import nixpkgs {
inherit system;
overlays = [
self.overlay
];
};
in
{
devShells.default = import ./shell.nix { inherit pkgs; };
packages.default = pkgs.callPackage ./default.nix { };
packages.frontend = pkgs.mmelodies.frontend;
}
);
) // {
overlay =
(final: super: {
napalm = import inputs.napalm { pkgs = super; };
mmelodies = {
frontend = final.callPackage ./default.nix {};
};
});
};
}

View file

@ -1,8 +1,6 @@
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
packages = with pkgs; [
biome
nodejs
nil
];
}