Hebrews 12:1-3: "1 Therefore, since we are surrounded by so great a cloud of witnesses, let us also lay aside every weight, and sin which clings so closely, and let us run with endurance the race that is set before us, 2 looking to Jesus, the founder and perfecter of our faith, who for the joy that was set before him endured the cross, despising the shame, and is seated at the right hand of the throne of God.
"3 Consider him who endured from sinners such hostility against himself, so that you may not grow weary or fainthearted."
Revelation 2:10: "'Do not fear what you are about to suffer. Behold, the devil is about to throw some of you into prison, that you may be tested, and for ten days you will have tribulation. Be faithful unto death, and I will give you the crown of life.'"
Revelation 14:13: "And I heard a voice from heaven saying, 'Write this: Blessed are the dead who die in the Lord from now on.' 'Blessed indeed,' says the Spirit, 'that they may rest from their labors, for their deeds follow them!'"
Revelation 17:14: "'They will make war on the Lamb, and the Lamb will conquer them, for he is Lord of lords and King of kings, and those with him are called and chosen and faithful.'"
+++
The text is public domain:
For all the saints, who from their labors rest,Who Thee by faith before the world confessed,Thy name, O Jesus, be forever blest.Alleluia!Alleluia!Thou wast their rock, their fortress, and their might;Thou, Lord, their captain in the well-fought fight;Thou, in the darkness drear, their one true light.Alleluia!Alleluia!Oh, may Thy soldiers, faithful, true, and bold,Fight as the saints who nobly fought of oldAnd win with them the victor's crown of gold!Alleluia!Alleluia!Oh, blest communion, fellowship divine!We feebly struggle, they in glory shine;Yet all are one in Thee, for all are Thine.Alleluia!Alleluia!And when the fight is fierce, the warfare long,Steals on the ear the distant triumph song,And hearts are brave again, and arms are strong.Alleluia!Alleluia!The golden evening brightens in the west;Soon, soon to faithful warriors cometh rest;Sweet is the calm of paradise the blest.Alleluia!Alleluia!But, lo, there breaks a yet more glorious day:The saints triumphant rise in bright array;The King of Glory passes on His way.Alleluia!Alleluia!From earth's wide bounds, from ocean's farthest coast,Through gates of pearl streams in the countless host,Singing to Father, Son, and Holy Ghost:Alleluia!Alleluia!
+++
The "great a cloud of witnesses" from Hebrews 12:1 and "'that they may rest from their labors'" from Revelation 14:13 seem to be combined in the hymn's first line: "For all the saints who from their labors rest." The rest is also referred to in the sixth verse ("Soon, soon to faithful warriors cometh rest"). Hebrews 12:2 (the focus on Jesus) seems to be the basis for the second verse. The anaphora (the repeated "Thou") illustrates this focus, as does the description "in the darkness drear, their one true light," which seems to refer to John 1:9 ("The true light, which enlightens everyone, was coming into the world.") and John 8:12 (where Jesus says, "I am the light of the world"). Hebrews 12:3 (particularly "that you may not grow weary or fainthearted") seems to be referred to at the end of the fifth verse: "And hearts are brave again, and arms are strong."
The crown in Revelation 2:10 is mentioned at the end of the third verse: "And win with them the victor's crown of gold!"
The military imagery in Revelation 17:14 appears primarily in the second and third verses and to a lesser extent in the fifth and sixth verses.
The eighth and ninth verses also contain elements from Revelation. The line "The saints triumphant rise in bright array" in the eighth verse refers to the white robes in Revelation 7, and the description "gates of pearl" in the ninth verse is drawn from Revelation 21:21.
Perhaps coincidentally, the line "Oh, may Thy soldiers, faithful, true, and bold" at the beginning of the third verse has some language in common with Revelation 19:11: "Then I saw heaven opened, and behold, a white horse! The one sitting on it is called Faithful and True, and in righteousness he judges and makes war."