Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Bob
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OSS
Bob
Commits
736ca64b
Verified
Commit
736ca64b
authored
1 year ago
by
Volker Schukai
Browse files
Options
Downloads
Patches
Plain Diff
chore: packaging
parent
0d4cd39b
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
flake.lock
+3
-54
3 additions, 54 deletions
flake.lock
flake.nix
+54
-25
54 additions, 25 deletions
flake.nix
release.json
+1
-1
1 addition, 1 deletion
release.json
with
58 additions
and
80 deletions
flake.lock
+
3
−
54
View file @
736ca64b
{
"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": 1688679045,
...
...
@@ -25,50 +10,14 @@
"type": "github"
},
"original": {
"
owner
": "
N
ix
OS
",
"
id
": "
n
ix
pkgs
",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
"type": "indirect"
}
},
"root": {
"inputs": {
"nix-filter": "nix-filter",
"nixpkgs": "nixpkgs",
"utils": "utils"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1687709756,
"narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
"nixpkgs": "nixpkgs"
}
}
},
...
...
This diff is collapsed.
Click to expand it.
flake.nix
+
54
−
25
View file @
736ca64b
{
description
=
"Bob: The HTML and HTML fragment builder"
;
inputs
=
{
nixpkgs
.
url
=
github
:
NixOS/nixpkgs/nixos-unstable
;
utils
.
url
=
github
:
numtide/flake-utils
;
nix-filter
.
url
=
github
:
numtide/nix-filter
;
};
description
=
"Bob: The HTML and HTML fragment builder"
;
# Nixpkgs / NixOS version to use.
inputs
.
nixpkgs
.
url
=
"nixpkgs/nixos-unstable"
;
outputs
=
{
self
,
nixpkgs
}:
let
outputs
=
{
self
,
nixpkgs
,
utils
,
nix-filter
}:
let
# to work with older version of flakes
# to work with older version of flakes
lastModifiedDate
=
self
.
lastModifiedDate
or
self
.
lastModified
or
"19700101"
;
# Generate a user-friendly version number.
#version = builtins.substring 0 8 lastModifiedDate;
rootPath
=
./.
;
releaseJson
=
builtins
.
fromJSON
(
builtins
.
readFile
"
${
rootPath
}
/release.json"
);
version
=
releaseJson
.
version
;
# System types to support.
supportedSystems
=
[
"x86_64-linux"
"x86_64-darwin"
"aarch64-linux"
"aarch64-darwin"
];
...
...
@@ -20,15 +27,22 @@
# Nixpkgs instantiated for supported system types.
nixpkgsFor
=
forAllSystems
(
system
:
import
nixpkgs
{
inherit
system
;
});
rootPath
=
./.
;
releaseJson
=
builtins
.
fromJSON
(
builtins
.
readFile
"
${
rootPath
}
/release.json"
);
currentVersion
=
releaseJson
.
version
;
in
(
utils
.
lib
.
eachDefaultSystem
(
system
:
rec
{
packages
.
app
=
nixpkgs
.
legacyPackages
.
${
system
}
.
buildGoModule
{
pname
=
"bob"
;
version
=
currentVersion
;
in
{
# Provide some binary packages for selected system types.
packages
=
forAllSystems
(
system
:
let
pkgs
=
nixpkgsFor
.
${
system
};
in
{
bob
=
pkgs
.
buildGoModule
{
pname
=
"bob"
;
inherit
version
;
# In 'nix develop', we don't need a copy of the source tree
# in the Nix store.
src
=
././application/source
;
...
...
@@ -41,20 +55,35 @@
# 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 = nixpkgs.legacyPackages.${system}.lib.fakeSha256;
#vendorSha256 = pkgs.lib.fakeSha256;
vendorSha256
=
"sha256-XdB+u94Rqsb29jVs4miyOq1NEYaVJHWFXg6QebFJzNQ="
;
doCheck
=
false
;
meta
=
with
nixpkgs
.
legacyPackages
.
${
system
}
.
lib
;
{
description
=
"Bob: The HTML and HTML fragment builder"
;
homepage
=
"https://gitlab.schukai.com/oss/bob"
;
license
=
licenses
.
mit
;
maintainers
=
with
maintainers
;
[
"schukai GmbH"
];
};
};
};
defaultPackage
=
packages
.
app
;
}));
});
# Add dependencies that are only needed for development
devShells
=
forAllSystems
(
system
:
let
pkgs
=
nixpkgsFor
.
${
system
};
in
{
default
=
pkgs
.
mkShell
{
buildInputs
=
with
pkgs
;
[
go
gopls
gotools
go-tools
];
};
});
# 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
);
};
}
This diff is collapsed.
Click to expand it.
release.json
+
1
−
1
View file @
736ca64b
{
"version"
:
"0.6.
1
"
}
{
"version"
:
"0.6.
2
"
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment