fix: fixed publish dates for builds
This commit is contained in:
parent
51b237dd8e
commit
cbd04018d2
2 changed files with 33 additions and 4 deletions
|
|
@ -18,16 +18,21 @@
|
||||||
f {
|
f {
|
||||||
pkgs = import nixpkgs {inherit overlays system;};
|
pkgs = import nixpkgs {inherit overlays system;};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
realSrc = /. + (builtins.getEnv "PWD");
|
||||||
in {
|
in {
|
||||||
packages = forEachSupportedSystem ({pkgs}: {
|
packages = forEachSupportedSystem ({pkgs}: {
|
||||||
default = pkgs.callPackage ./nix/package.nix {
|
default = pkgs.callPackage ./nix/package.nix {
|
||||||
siteUrl = "https://blog.jan-leila.com";
|
siteUrl = "https://blog.jan-leila.com";
|
||||||
|
src = realSrc;
|
||||||
};
|
};
|
||||||
blog = pkgs.callPackage ./nix/package.nix {
|
blog = pkgs.callPackage ./nix/package.nix {
|
||||||
siteUrl = "https://blog.jan-leila.com";
|
siteUrl = "https://blog.jan-leila.com";
|
||||||
|
src = realSrc;
|
||||||
};
|
};
|
||||||
volpe = pkgs.callPackage ./nix/package.nix {
|
volpe = pkgs.callPackage ./nix/package.nix {
|
||||||
siteUrl = "https://volpe.jan-leila.com";
|
siteUrl = "https://volpe.jan-leila.com";
|
||||||
|
src = realSrc;
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -58,7 +63,8 @@
|
||||||
echo "Building and deploying to cyberian@69.61.19.180..."
|
echo "Building and deploying to cyberian@69.61.19.180..."
|
||||||
nixos-rebuild switch --flake .#volpe \
|
nixos-rebuild switch --flake .#volpe \
|
||||||
--target-host cyberian@69.61.19.180 \
|
--target-host cyberian@69.61.19.180 \
|
||||||
--sudo
|
--sudo \
|
||||||
|
--impure
|
||||||
'');
|
'');
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -5,26 +5,49 @@
|
||||||
pnpm_10,
|
pnpm_10,
|
||||||
fetchPnpmDeps,
|
fetchPnpmDeps,
|
||||||
pnpmConfigHook,
|
pnpmConfigHook,
|
||||||
|
git,
|
||||||
siteUrl,
|
siteUrl,
|
||||||
|
src,
|
||||||
}: let
|
}: let
|
||||||
nodejs = nodejs_latest;
|
nodejs = nodejs_latest;
|
||||||
pnpm = pnpm_10;
|
pnpm = pnpm_10;
|
||||||
|
|
||||||
|
# Filter source: use cleanSourceFilter as base, but include .git and exclude _site
|
||||||
|
filteredSrc = lib.cleanSourceWith {
|
||||||
|
inherit src;
|
||||||
|
filter = path: type:
|
||||||
|
let
|
||||||
|
baseName = baseNameOf path;
|
||||||
|
# Always include .git directory
|
||||||
|
isGit = baseName == ".git" || lib.hasInfix "/.git/" path || lib.hasSuffix "/.git" path;
|
||||||
|
in
|
||||||
|
isGit || (
|
||||||
|
# Apply base cleanSourceFilter
|
||||||
|
lib.cleanSourceFilter path type &&
|
||||||
|
# Additional exclusions
|
||||||
|
baseName != "_site" &&
|
||||||
|
baseName != "node_modules"
|
||||||
|
);
|
||||||
|
};
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "volpe";
|
pname = "volpe";
|
||||||
version = "1.0.0";
|
version = "1.0.0";
|
||||||
|
|
||||||
src = lib.cleanSource ./..;
|
src = filteredSrc;
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
nodejs
|
nodejs
|
||||||
pnpm
|
pnpm
|
||||||
pnpmConfigHook
|
pnpmConfigHook
|
||||||
|
git
|
||||||
];
|
];
|
||||||
|
|
||||||
# fetchPnpmDeps creates the offline store
|
# fetchPnpmDeps creates the offline store
|
||||||
|
# Use clean source (excludes .git, _site, node_modules)
|
||||||
pnpmDeps = fetchPnpmDeps {
|
pnpmDeps = fetchPnpmDeps {
|
||||||
inherit (finalAttrs) pname version src;
|
inherit (finalAttrs) pname version;
|
||||||
|
src = lib.cleanSource src;
|
||||||
hash = "sha256-rN8P6g/Wuug+fv0rm/qbKN01NgcbpgEQmhDFe2X42uA=";
|
hash = "sha256-rN8P6g/Wuug+fv0rm/qbKN01NgcbpgEQmhDFe2X42uA=";
|
||||||
fetcherVersion = 3; # pnpm store version
|
fetcherVersion = 3; # pnpm store version
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue