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": { "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": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1688500189, "lastModified": 1688679045,
"narHash": "sha256-djYYiY4lzJOlXOnTHytH6BUugrxHDZjuGxTSrU4gt4M=", "narHash": "sha256-t3xGEfYIwhaLTPU8FLtN/pLPytNeDwbLI6a7XFFBlGo=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "78419edadf0fabbe5618643bd850b2f2198ed060", "rev": "3c7487575d9445185249a159046cc02ff364bff8",
"type": "github" "type": "github"
}, },
"original": { "original": {
"id": "nixpkgs", "owner": "NixOS",
"ref": "nixos-unstable", "ref": "nixos-unstable",
"type": "indirect" "repo": "nixpkgs",
"type": "github"
} }
}, },
"root": { "root": {
"inputs": { "inputs": {
"nix-filter": "nix-filter",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"utils": "utils" "utils": "utils"
} }
......
{ {
description = "Bob: The HTML and HTML fragment builder"; description = "Bob: The HTML and HTML fragment builder";
inputs = { inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable"; nixpkgs.url = github:NixOS/nixpkgs/nixos-unstable;
utils.url = "github:numtide/flake-utils"; utils.url = github:numtide/flake-utils;
nix-filter.url = github:numtide/nix-filter;
}; };
outputs = { self, nixpkgs, ... }@inputs:
outputs = {self, nixpkgs, utils, nix-filter }:
let let
# to work with older version of flakes # to work with older version of flakes
lastModifiedDate = self.lastModifiedDate or self.lastModified or "19700101"; lastModifiedDate = self.lastModifiedDate or self.lastModified or "19700101";
...@@ -22,17 +24,8 @@ ...@@ -22,17 +24,8 @@
rootPath = ./.; rootPath = ./.;
releaseJson = builtins.fromJSON (builtins.readFile "${rootPath}/release.json"); releaseJson = builtins.fromJSON (builtins.readFile "${rootPath}/release.json");
currentVersion = releaseJson.version; currentVersion = releaseJson.version;
in (utils.lib.eachDefaultSystem (system: rec {
in packages.app = nixpkgs.legacyPackages.${system}.buildGoModule {
{
# Provide some binary packages for selected system types.
packages = forAllSystems (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
bob = pkgs.buildGoModule {
pname = "bob"; pname = "bob";
version = currentVersion; version = currentVersion;
...@@ -48,14 +41,14 @@ ...@@ -48,14 +41,14 @@
# it should be "out-of-band" with other tooling (eg. gomod2nix). # it should be "out-of-band" with other tooling (eg. gomod2nix).
# To begin with it is recommended to set this, but one must # To begin with it is recommended to set this, but one must
# remeber to bump this hash when your dependencies change. # remeber to bump this hash when your dependencies change.
#vendorSha256 = pkgs.lib.fakeSha256; #vendorSha256 = nixpkgs.legacyPackages.${system}.lib.fakeSha256;
vendorSha256 = "sha256-XdB+u94Rqsb29jVs4miyOq1NEYaVJHWFXg6QebFJzNQ="; vendorSha256 = "sha256-XdB+u94Rqsb29jVs4miyOq1NEYaVJHWFXg6QebFJzNQ=";
excludedPackages = [ "development" ]; excludedPackages = [ "development" ];
doCheck = false; doCheck = false;
meta = with pkgs.lib; { meta = with nixpkgs.legacyPackages.${system}.lib; {
description = "Bob: The HTML and HTML fragment builder"; description = "Bob: The HTML and HTML fragment builder";
homepage = "https://gitlab.schukai.com/oss/bob"; homepage = "https://gitlab.schukai.com/oss/bob";
license = licenses.mit; license = licenses.mit;
...@@ -64,12 +57,6 @@ ...@@ -64,12 +57,6 @@
}; };
}); defaultPackage = packages.app;
}));
# 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);
};
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment