cv/flake.nix

60 lines
1.4 KiB
Nix
Raw Permalink Normal View History

2023-11-12 18:07:31 +01:00
{
inputs = {
2024-07-24 18:47:45 +02:00
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
2023-11-21 11:41:31 +01:00
ide = {
url = "github:ivandimitrov8080/flake-ide";
inputs.nixpkgs.follows = "nixpkgs";
};
2023-11-12 18:07:31 +01:00
};
2024-07-24 18:47:45 +02:00
outputs = { nixpkgs, ide, ... }:
2023-12-19 15:33:47 +01:00
let
system = "x86_64-linux";
2024-07-24 18:47:45 +02:00
pkgs = import nixpkgs {
inherit system; overlays = [
(final: prev: {
nvim = ide.nvim.${system}.standalone.default {
plugins = {
lsp.servers = {
tsserver.enable = true;
jsonls.enable = true;
tailwindcss.enable = true;
};
};
};
})
];
};
2023-12-19 15:33:47 +01:00
pname = "cv";
version = "0.1.1";
2023-12-19 15:33:47 +01:00
src = ./.;
in
{
devShells.${system}.default = pkgs.mkShell {
2024-07-24 18:47:45 +02:00
inherit pname;
buildInputs = with pkgs; [
nvim
bun
];
2023-12-19 15:33:47 +01:00
};
2024-07-24 18:47:45 +02:00
packages.${system}.default = pkgs.mkYarnPackage {
inherit pname version src;
nativeBuildInputs = [ pkgs.bun ];
offlineCache = pkgs.fetchYarnDeps {
yarnLock = "${src}/yarn.lock";
hash = "sha256-HKoIv3YMKy5uZ/wT2grg+Z6k4CMykY9dj/okfA2uias=";
};
buildPhase = ''
yarn --offline build
'';
doDist = false;
2023-12-19 15:33:47 +01:00
postInstall = ''
ls -alh
rm -rf $out/lib
2024-07-24 18:47:45 +02:00
rm -rf $out/libexec
rm -rf $out/bin
2023-11-13 12:33:50 +01:00
'';
2023-12-19 15:33:47 +01:00
};
};
2023-11-12 18:07:31 +01:00
}