mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-29 02:13:23 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
46 lines
976 B
Diff
46 lines
976 B
Diff
diff --git a/moxvar/version.go b/moxvar/version.go
|
|
index 8c6bac8..69b5f7c 100644
|
|
--- a/moxvar/version.go
|
|
+++ b/moxvar/version.go
|
|
@@ -1,38 +1,5 @@
|
|
// Package moxvar provides the version number of a mox build.
|
|
package moxvar
|
|
|
|
-import (
|
|
- "runtime/debug"
|
|
-)
|
|
-
|
|
-// Version is set at runtime based on the Go module used to build.
|
|
-var Version = "(devel)"
|
|
-
|
|
-func init() {
|
|
- buildInfo, ok := debug.ReadBuildInfo()
|
|
- if !ok {
|
|
- return
|
|
- }
|
|
- Version = buildInfo.Main.Version
|
|
- if Version == "(devel)" {
|
|
- var vcsRev, vcsMod string
|
|
- for _, setting := range buildInfo.Settings {
|
|
- if setting.Key == "vcs.revision" {
|
|
- vcsRev = setting.Value
|
|
- } else if setting.Key == "vcs.modified" {
|
|
- vcsMod = setting.Value
|
|
- }
|
|
- }
|
|
- if vcsRev == "" {
|
|
- return
|
|
- }
|
|
- Version = vcsRev
|
|
- switch vcsMod {
|
|
- case "false":
|
|
- case "true":
|
|
- Version += "+modifications"
|
|
- default:
|
|
- Version += "+unknown"
|
|
- }
|
|
- }
|
|
-}
|
|
+// Version is set via a build flag
|
|
+var Version string;
|