Skip to content
Snippets Groups Projects
Verified Commit e30e45bb authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

chore: packaging

parent 0efffcdb
No related branches found
No related tags found
No related merge requests found
{
"nodes": {
"nix-filter": {
"locked": {
"lastModified": 1687178632,
"narHash": "sha256-HS7YR5erss0JCaUijPeyg2XrisEb959FIct3n2TMGbE=",
"owner": "numtide",
"repo": "nix-filter",
"rev": "d90c75e8319d0dd9be67d933d8eb9d0894ec9174",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "nix-filter",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1688500189,
"narHash": "sha256-djYYiY4lzJOlXOnTHytH6BUugrxHDZjuGxTSrU4gt4M=",
"lastModified": 1688679045,
"narHash": "sha256-t3xGEfYIwhaLTPU8FLtN/pLPytNeDwbLI6a7XFFBlGo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "78419edadf0fabbe5618643bd850b2f2198ed060",
"rev": "3c7487575d9445185249a159046cc02ff364bff8",
"type": "github"
},
"original": {
"id": "nixpkgs",
"owner": "NixOS",
"ref": "nixos-unstable",
"type": "indirect"
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nix-filter": "nix-filter",
"nixpkgs": "nixpkgs",
"utils": "utils"
}
......
{
description = "Bob: The HTML and HTML fragment builder";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
utils.url = "github:numtide/flake-utils";
};
nixpkgs.url = github:NixOS/nixpkgs/nixos-unstable;
utils.url = github:numtide/flake-utils;
nix-filter.url = github:numtide/nix-filter;
};
outputs = { self, nixpkgs, ... }@inputs:
let
# to work with older version of flakes
outputs = {self, nixpkgs, utils, nix-filter }:
let
# to work with older version of flakes
lastModifiedDate = self.lastModifiedDate or self.lastModified or "19700101";
# System types to support.
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
......@@ -21,18 +23,9 @@
rootPath = ./.;
releaseJson = builtins.fromJSON (builtins.readFile "${rootPath}/release.json");
currentVersion = releaseJson.version;
in
{
# Provide some binary packages for selected system types.
packages = forAllSystems (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
bob = pkgs.buildGoModule {
currentVersion = releaseJson.version;
in (utils.lib.eachDefaultSystem (system: rec {
packages.app = nixpkgs.legacyPackages.${system}.buildGoModule {
pname = "bob";
version = currentVersion;
......@@ -48,14 +41,14 @@
# it should be "out-of-band" with other tooling (eg. gomod2nix).
# To begin with it is recommended to set this, but one must
# remeber to bump this hash when your dependencies change.
#vendorSha256 = pkgs.lib.fakeSha256;
#vendorSha256 = nixpkgs.legacyPackages.${system}.lib.fakeSha256;
vendorSha256 = "sha256-XdB+u94Rqsb29jVs4miyOq1NEYaVJHWFXg6QebFJzNQ=";
excludedPackages = [ "development" ];
doCheck = false;
meta = with pkgs.lib; {
meta = with nixpkgs.legacyPackages.${system}.lib; {
description = "Bob: The HTML and HTML fragment builder";
homepage = "https://gitlab.schukai.com/oss/bob";
license = licenses.mit;
......@@ -64,12 +57,6 @@
};
});
# The default package for 'nix build'. This makes sense if the
# flake provides only one package or there is a clear "main"
# package.
defaultPackage = forAllSystems (system: self.packages.${system}.bob);
};
}
defaultPackage = packages.app;
}));
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment