Skip to content

Commit 2c95fb7

Browse files
authored
sat and checksums are now git submodules (#1285)
1 parent 30258d6 commit 2c95fb7

11 files changed

+17
-30
lines changed

.gitmodules

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
[submodule "vendor/zippy"]
22
path = vendor/zippy
33
url = https://github.com/guzba/zippy.git
4+
[submodule "vendor/sat"]
5+
path = vendor/sat
6+
url = https://github.com/nim-lang/sat.git
7+
[submodule "vendor/checksums"]
8+
path = vendor/checksums
9+
url = https://github.com/nim-lang/checksums.git

config.nims

+2
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ import std/os
44
switch("warning", "ObservableStores:off")
55
switch("define", "ssl")
66
switch("path", "vendor" / "zippy" / "src")
7+
switch("path", "vendor" / "sat" / "src")
8+
switch("path", "vendor" / "checksums" / "src")

nimble.nimble

+1-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ srcDir = "src"
1010
installExt = @["nim"]
1111

1212
# Dependencies
13-
14-
requires "nim >= 0.13.0", "sat"
15-
requires "checksums"
13+
requires "nim >= 2.0.12"
1614

1715
when defined(nimdistros):
1816
import distros

src/nimble.nim

+1-4
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@ import std/options as std_opt
88

99
import strutils except toLower
1010
from unicode import toLower
11-
when defined(nimNimbleBootstrap):
12-
import ../dist/sat/src/sat/sat
13-
else:
14-
import sat/sat
11+
import sat/sat
1512
import nimblepkg/packageinfotypes, nimblepkg/packageinfo, nimblepkg/version,
1613
nimblepkg/tools, nimblepkg/download, nimblepkg/common,
1714
nimblepkg/publish, nimblepkg/options, nimblepkg/packageparser,

src/nimblepkg/checksums.nim

+1-5
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@
33

44
import os, strformat, algorithm
55
import common, version, sha1hashes, vcstools, paths, cli
6-
7-
when defined(nimNimbleBootstrap):
8-
import ../../dist/checksums/src/checksums/sha1
9-
else:
10-
import pkg/checksums/sha1
6+
import pkg/checksums/sha1
117

128
type
139
ChecksumError* = object of NimbleError

src/nimblepkg/nimblesat.nim

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
when defined(nimNimbleBootstrap):
2-
import ../../dist/sat/src/sat/[sat, satvars]
3-
else:
4-
import sat/[sat, satvars]
1+
import sat/[sat, satvars]
52
import version, packageinfotypes, download, packageinfo, packageparser, options,
63
sha1hashes, tools, downloadnim
74

src/nimblepkg/sha1hashes.nim

+1-5
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@
33

44
import strformat, strutils, json, hashes
55
import common
6-
7-
when defined(nimNimbleBootstrap):
8-
import ../../dist/checksums/src/checksums/sha1
9-
else:
10-
import pkg/checksums/sha1
6+
import pkg/checksums/sha1
117

128
type
139
InvalidSha1HashError* = object of NimbleError

src/nimblepkg/vcstools.nim

+1-4
Original file line numberDiff line numberDiff line change
@@ -638,10 +638,7 @@ proc fastForwardMerge*(path: Path, remoteBranch, localBranch: string) =
638638

639639
when isMainModule:
640640
import unittest, sequtils
641-
when defined(nimNimbleBootstrap):
642-
import ../../dist/checksums/src/checksums/sha1
643-
else:
644-
import pkg/checksums/sha1
641+
import pkg/checksums/sha1
645642

646643
type
647644
NameToVcsRevision = OrderedTable[string, Sha1Hash]

tests/testscommon.nim

+1-5
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@
44
{.used.}
55

66
import sequtils, strutils, strformat, os, osproc, sugar, unittest, macros
7-
8-
when defined(nimNimbleBootstrap):
9-
import ../dist/checksums/src/checksums/sha1
10-
else:
11-
import pkg/checksums/sha1
7+
import pkg/checksums/sha1
128

139
from nimblepkg/common import cd, nimblePackagesDirName, ProcessOutput
1410
from nimblepkg/developfile import developFileVersion

vendor/checksums

Submodule checksums added at f8f6bd3

vendor/sat

Submodule sat added at faf1617

0 commit comments

Comments
 (0)